Difference between revisions of "cpp/named req/ConstexprIterator"
From cppreference.com
(After [https://wg21.link/LWG3320 3320] the span::const_iterator was annihilated)) |
(→Standard library: P1004R2 (basic_string::iterator is missing currently...)) |
||
Line 24: | Line 24: | ||
* {{ltt|cpp/string/basic_string_view|basic_string_view::iterator}}. | * {{ltt|cpp/string/basic_string_view|basic_string_view::iterator}}. | ||
* {{ltt|cpp/container/span|span::iterator}}. | * {{ltt|cpp/container/span|span::iterator}}. | ||
+ | * {{ltt|cpp/container/vector|vector::iterator}} and {{ltt|cpp/container/vector|vector::const_iterator}}. | ||
===See also=== | ===See also=== |
Revision as of 01:30, 31 May 2020
A ConstexprIterator is an LegacyIterator that can be used during constant expression evaluation.
Requirements
The type It
satisfies ConstexprIterator if
- The type
It
satisfies some iterator requirements MeowIterator
And, for every
-
purr
, an operation onIt
that is required to be supported by MeowIterator, -
kittens...
, a set of arguments topurr
that meets the requirements for that operation,
Then
-
purr(kittens...)
may be used in a constant expression ifkittens...
can be so used
Standard library
The following standard library types are ConstexprIterators.
- array::iterator and array::const_iterator.
- basic_string_view::iterator.
- span::iterator.
- vector::iterator and vector::const_iterator.