17 Concepts library [concepts]

17.6 Object concepts [concepts.object]

This subclause describes concepts that specify the basis of the value-oriented programming style on which the library is based.
template<class T> concept Movable = is_object_v<T> && MoveConstructible<T> && Assignable<T&, T> && Swappable<T>; template<class T> concept Copyable = CopyConstructible<T> && Movable<T> && Assignable<T&, const T&>; template<class T> concept Semiregular = Copyable<T> && DefaultConstructible<T>; template<class T> concept Regular = Semiregular<T> && EqualityComparable<T>;
[ Note
:
The Semiregular concept is satisfied by types that behave similarly to built-in types like int, except that they might not be comparable with ==.
— end note
 ]
[ Note
:
The Regular concept is satisfied by types that behave similarly to built-in types like int and that are comparable with ==.
— end note
 ]