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&, T&> && assignable_­from<T&, const T&> && assignable_­from<T&, const T>; template<class T> concept semiregular = copyable<T> && default_initializable<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
 ]