# std::ranges::subrange<I,S,K>::begin

> C++ Atlas: `cppatlas.com/w/cpp/ranges/subrange/begin` | Source: https://en.cppreference.com/w/cpp/ranges/subrange/begin | Domain: Ranges | Standards: C++11, C++14, C++20

Obtains the iterator to the beginning of the subrange.

## Official Specification Summary (cppreference)

```cpp
constexpr I begin() const requires std::copyable<I>; // (1) (since C++20)
constexpr I begin() requires (!std::copyable<I>); // (2) (since C++20)
```

Obtains the iterator to the beginning of the `subrange`.

### Return value

1) `begin_`.

2) `std::move(begin_)`.

### Example

> Note: This section is incomplete Reason: no example

### See also

- [`end`](https://en.cppreference.com/w/cpp/ranges/subrange/end): obtains the sentinel (public member function)
- [`begin`](https://en.cppreference.com/w/cpp/iterator/begin) (C++11), [`cbegin`](https://en.cppreference.com/w/cpp/iterator/begin) (C++14): returns an iterator to the beginning of a container or array (function template)
- [`ranges::begin`](https://en.cppreference.com/w/cpp/ranges/begin) (C++20): returns an iterator to the beginning of a range (customization point object)

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