Named Requirements
From cppreference.com
< cpp
C++
Named requirements
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
C++ named requirements
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++20)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++14)
(C++14)
(C++11)
(C++11)
(C++17)
(C++14)
(C++20)
(C++20)
(C++23)
(C++23)
(C++23)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
The named requirements listed on this page are the named requirements used in the normative text of the C++ standard to define the expectations of the standard library.
The burden to ensure that library templates are instantiated with template arguments that satisfy these requirements is on the programmer. Failure to do so may result in very complex compiler diagnostics.
Some of these requirements are formalized in C++20 using the concepts language feature.
Contents
Basic
specifies that an object of the type can be default constructed
(named requirement)
(named requirement)
(C++11)
(named requirement)
specifies that an object of the type can be constructed from lvalue
(named requirement)
(named requirement)
(C++11)
(named requirement)
Type properties
Note: the standard does not define named requirements with names specified in this subcategory.
These are type categories defined by the core language. They are included here as named requirements only for consistency.
These are type categories defined by the core language. They are included here as named requirements only for consistency.
(deprecated in C++20)
(named requirement)
(C++11)
(named requirement)
(C++11)(deprecated in C++26)
(named requirement)
(C++11)
(named requirement)
objects of these types can be implicitly created, and their lifetimes can be implicitly started
(named requirement)
(named requirement)
Library-wide
boolean operations (operator&&, operator||, and operator!) have usual semantics
(named requirement)
(named requirement)
(C++11)
(named requirement)
a FunctionObject that returns a value convertible to bool for one argument without modifying it
(named requirement)
(named requirement)
a FunctionObject that returns a value convertible to bool for two arguments without modifying them
(named requirement)
(named requirement)
Container
(C++17)
(named requirement)
(C++11)
(named requirement)
Container element
(C++11)
(named requirement)
Iterator
iterator that can be both incremented and decremented
(named requirement)
(named requirement)
(C++20)
(named requirement)
Stream I/O functions
a stream input function that does not skip leading whitespace and counts the processed characters
(named requirement)
(named requirement)
a stream output function that sets failbit on errors and returns a reference to the stream
(named requirement)
(named requirement)
Formatters
(C++20)
(named requirement)
Random Number Generation
(C++11)
(named requirement)
(C++11)
(named requirement)
(C++11)
(named requirement)
(C++11)
(named requirement)
Concurrency
(C++11)
(named requirement)
(C++14)
(named requirement)
(C++11)
(named requirement)
(C++11)
(named requirement)
Ranges
(C++20)
viewable_range
and additional arguments(named requirement)
Multidimensional View Customization
Other
(C++11)
(named requirement)
This section is incomplete
Reason: Any other missing requirement?
Reason: Any other missing requirement?