# std::ranges::elements_view<V,F>::iterator<Const>::base

> C++ Atlas: `cppatlas.com/w/cpp/ranges/elements_view/iterator/base` | Source: https://en.cppreference.com/w/cpp/ranges/elements_view/iterator/base | Domain: Ranges | Standards: C++20

Returns the underlying iterator.

## Official Specification Summary (cppreference)

```cpp
constexpr const ranges::iterator_t<Base>& base() const & noexcept; // (1) (since C++20)
constexpr ranges::iterator_t<Base> base() &&; // (2) (since C++20)
```

Returns the underlying iterator.

1) Returns a reference to the underlying iterator.

2) Move constructs the result from the underlying iterator.

### Parameters

(none)

### Return value

1) A reference to the underlying iterator.

1) An iterator move constructed from the underlying iterator.

### Example

> Note: This section is incomplete Reason: no example

### Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

| DR | Applied to | Behavior as published | Correct behavior |
| --- | --- | --- | --- |
| LWG 3533 | C++20 | the `const&` overload of `base` returns a copy of the underlying iterator | returns a reference |
| LWG 3593 | C++20 | the `const&` overload of `base` might not be noexcept | made noexcept |

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