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 1:
The semiregular concept is modeled by types that behave similarly to built-in types like int, except that they need not be comparable with ==.
— end note]
[Note 2:
The regular concept is modeled by types that behave similarly to built-in types like int and that are comparable with ==.
— end note]