std::basic_...nt-iterator(3)
π NAME π
std::basic_const_iterator::operatorconstant-iteratorstd::basic_const_iterator::operatorconstant-iterator
Okay so bestie, welcome to the std::basic_...nt-iterator(3) page. Manual name: C++ Standard Libary β yes, that's the spelling on the page, and we're not fixing it, periodt. π
This whole thing is giving conversion-operator main character energy, and we're gonna keep every detail. β¨
πΈ Synopsis πΈ
template< /*not-a-const-iterator*/ CI >
requires /*constant-iterator*/<CI> && (1) (since C++23)
std::convertible_to<Iter const&, CI>
constexpr operator CI() const &;
template< /*not-a-const-iterator*/ CI >
requires /*constant-iterator*/<CI> && (2) (since C++23)
std::convertible_to<Iter, CI>
constexpr operator CI() &&;
Returns the converted constant iterator to which an underlying iterator current can be explicitly or implicitly convertible. No cap, that's the whole vibe. π¦
CI satisfies the exposition-only concept /*not-a-const-iterator*/ if and only if it's not a specialization of basic_const_iterator. Periodt. π
π Return value π
currentstd::move(current)
Short, sweet, iconic. π
π¦ Example π¦
This section is incomplete. Reason: no example.
Not me staring at an empty example section, but okay, we move. π
π₯ Defect reports π₯
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR:
P2836R1 - Applied to:
C++23 - Behavior as published:
basic_const_iteratordoesn't follow its underlying type's convertibility - Correct behavior: provided
History? Applied retroactively? We love a glow-up. β¨
π Category π
Todo no example
Bestie, that's the whole page, every detail intact, no skips, no cap. π«Ά
mwah π β source/version: http://cppreference.com, 2024.06.10. Go slay those conversions, bestie. ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms