Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/named req/ConstexprIterator"

From cppreference.com
< cpp‎ | named req
(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

 
 
C++ named requirements
 

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 on It that is required to be supported by MeowIterator,
  • kittens..., a set of arguments to purr that meets the requirements for that operation,

Then

  • purr(kittens...) may be used in a constant expression if kittens... can be so used

Standard library

The following standard library types are ConstexprIterators.

See also