Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | named req
(Undo revision 119328 by Radix (talk) eh, not everything has to be serious)
(After [https://wg21.link/LWG3320 3320] the span::const_iterator was annihilated))
Line 23: Line 23:
 
* {{ltt|cpp/container/array|array::iterator}} and {{ltt|cpp/container/array|array::const_iterator}}.
 
* {{ltt|cpp/container/array|array::iterator}} and {{ltt|cpp/container/array|array::const_iterator}}.
 
* {{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}} and {{ltt|cpp/container/span|span::const_iterator}}.
+
* {{ltt|cpp/container/span|span::iterator}}.
  
 
===See also===
 
===See also===

Revision as of 10:56, 30 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