# std::experimental::basic_string_view<CharT,Traits>::swap

> C++ Atlas: `cppatlas.com/w/cpp/experimental/basic_string_view/swap` | Source: https://en.cppreference.com/w/cpp/experimental/basic_string_view/swap | Domain: Technical specifications

Exchanges the view with that of v.

## Official Specification Summary (cppreference)

```cpp
constexpr void swap(basic_string_view& v) noexcept; // (library fundamentals TS)
```

Exchanges the view with that of `v`.

### Parameters

- `v` - view to swap with

### Return value

(none)

### Complexity

Constant.

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/basic_string_view/swap (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.