Standard library header <concepts>

From cppreference.com
< cpp‎ | header
 
 
 

This header is part of the concepts library.

Concepts

Core language concepts
(C++20)
specifies that a type is the same as another type
(concept)
specifies that a type is derived from another type
(concept)
specifies that a type is implicitly convertible to another type
(concept)
specifies that two types share a common reference type
(concept)
(C++20)
specifies that two types share a common type
(concept)
(C++20)
specifies that a type is an integral type
(concept)
specifies that a type is an integral type that is signed
(concept)
specifies that a type is an integral type that is unsigned
(concept)
specifies that a type is assignable from another type
(concept)
specifies that a type can be swapped or that two types can be swapped with each other
(concept)
specifies that an object of the type can be destroyed
(concept)
specifies that a variable of the type can be constructed from or bound to a set of argument types
(concept)
specifies that an object of a type can be default constructed
(concept)
specifies that an object of a type can be move constructed
(concept)
specifies that an object of a type can be copy constructed and move constructed
(concept)
Comparison concepts
(C++20)
specifies that a type can be used in Boolean contexts
(concept)
specifies that operator == is an equivalence relation
(concept)
specifies that the comparison operators on the type yield a total order
(concept)
Object concepts
(C++20)
specifies that an object of a type can be moved and swapped
(concept)
(C++20)
specifies that an object of a type can be copied, moved, and swapped
(concept)
specifies that an object of a type can be copied, moved, swapped, and default constructed
(concept)
(C++20)
specifies that a type is regular, that is, it is both Semiregular and EqualityComparable
(concept)
Callable concepts
specifies that a callable type can be invoked with a given set of argument types
(concept)
(C++20)
specifies that a callable type is a Boolean predicate
(concept)
(C++20)
specifies that a callable type is a binary relation
(concept)
specifies that a Relation imposes a strict weak ordering
(concept)


Synopsis

namespace std { 
 
    // Core language concepts
 
    template <class T, class U>
    concept Same = /* see description */;
 
    template <class Derived, class Base>
    concept DerivedFrom = /* see description */;
 
    template <class From, class To>
    concept ConvertibleTo = /* see description */;
 
    template <class T, class U>
    concept CommonReference = /* see description */;
 
    template <class T, class U>
    concept Common = /* see description */;
 
    template <class T>
    concept Integral = /* see description */;
 
    template <class T>
    concept SignedIntegral = /* see description */;
 
    template <class T>
    concept UnsignedIntegral = /* see description */;
 
    template <class LHS, class RHS>
    concept Assignable = /* see description */;
 
    template <class T>
    concept Swappable = /* see description */;
 
    template <class T, class U>
    concept SwappableWith = /* see description */;
 
    template <class T>
    concept Destructible = /* see description */;
 
    template <class T, class... Args>
    concept Constructible = /* see description */;
 
    template <class T>
    concept DefaultConstructible = /* see description */;
 
    template <class T>
    concept MoveConstructible = /* see description */;
 
    template <class T>
    concept CopyConstructible = /* see description */;
 
    // Comparison concepts
 
    template <class B>
    concept Boolean = /* see description */;
 
    template <class T>
    concept EqualityComparable = /* see description */;
    template <class T, class U>
    concept EqualityComparableWith = /* see description */;
 
    template <class T>
    concept StrictTotallyOrdered = /* see description */;
    template <class T, class U>
    concept StrictTotallyOrderedWith = /* see description */;
 
    // Object concepts
 
    template <class T>
    concept Movable = /* see description */;
 
    template <class T>
    concept Copyable = /* see description */;
 
    template <class T>
    concept Semiregular = /* see description */;
 
    template <class T>
    concept Regular = /* see description */;
 
    // Callable concepts
 
    template <class F, class... Args>
    concept Invocable = /* see description */;
 
    template <class F, class... Args>
    concept RegularInvocable = /* see description */;
 
    template <class F, class... Args>
    concept Predicate = /* see description */;
 
    template <class R, class T, class U>
    concept Relation = /* see description */;
 
    template <class R, class T, class U>
    concept StrictWeakOrder = /* see description */;
}