18 Concepts library [concepts]

18.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> && move_constructible<T> && assignable_from<T&, T> && swappable<T>; template<class T> concept copyable = copy_constructible<T> && movable<T> && assignable_from<T&, const T&>; template<class T> concept semiregular = copyable<T> && default_constructible<T>; template<class T> concept regular = semiregular<T> && equality_comparable<T>;
Note
:
The semiregular concept is modeled 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 modeled by types that behave similarly to built-in types like int and that are comparable with ==.
— end note
 ]