Concepts¶
For all the standard concepts that are involved in the definition of std::regular we provide supplementary concepts that check whether all the required operations are trivial or nothrow. There are standard type traits for all these requirements, but they weren’t grouped into concepts.
These concepts are especially useful in unit tests.
Reference¶
Core language concepts¶
For std::convertible_to:
-
template<class From, class To>
concept NothrowExplicitlyConvertibleTo¶ - #include <convertible_to.hpp>
-
template<class From, class To>
concept NothrowConvertibleTo¶ - #include <convertible_to.hpp>
-
template<class From, class To>
concept MayThrowConvertibleTo¶ - #include <convertible_to.hpp>
For std::assignable_from:
-
template<class Lhs, class Rhs>
concept TriviallyAssignableFrom¶ - #include <assignable_from.hpp>
-
template<class Lhs, class Rhs>
concept NothrowAssignableFrom¶ - #include <assignable_from.hpp>
For std::swappable, std::swappable_with:
-
template<class T>
concept NothrowSwappable¶ - #include <swappable.hpp>
-
template<class T, class U>
concept NothrowSwappableWith¶ - #include <swappable.hpp>
-
template<class T, class ...Args>
concept TriviallyConstructibleFrom¶ - #include <constructible_from.hpp>
-
template<class T, class ...Args>
concept NothrowConstructibleFrom¶ - #include <constructible_from.hpp>
For std::default_initializable:
-
template<class T>
concept TriviallyDefaultInitializable¶ - #include <default_initializable.hpp>
-
template<class T>
concept NothrowDefaultInitializable¶ - #include <default_initializable.hpp>
-
template<class T>
concept TriviallyMoveConstructible¶ - #include <move_constructible.hpp>
-
template<class T>
concept NothrowMoveConstructible¶ - #include <move_constructible.hpp>
-
template<class T>
concept TriviallyCopyConstructible¶ - #include <copy_constructible.hpp>
-
template<class T>
concept NothrowCopyConstructible¶ - #include <copy_constructible.hpp>
-
template<class T>
concept MayThrowCopyConstructible¶ - #include <copy_constructible.hpp>
Comparison concepts¶
-
template<class T>
concept NothrowEqualityComparable¶ - #include <equality_comparable.hpp>
Object concepts¶
For std::movable:
-
template<class T>
concept TriviallyMovable¶ - #include <movable.hpp>
-
template<class T>
concept NothrowMovable¶ - #include <movable.hpp>
For std::copyable:
-
template<class T>
concept TriviallyCopyable¶ - #include <copyable.hpp>
-
template<class T>
concept NothrowCopyable¶ - #include <copyable.hpp>
-
template<class T>
concept MayThrowCopyable¶ - #include <copyable.hpp>
For std::semiregular:
-
template<class T>
concept TriviallySemiregular¶ - #include <semiregular.hpp>
-
template<class T>
concept NothrowSemiregular¶ - #include <semiregular.hpp>
For std::regular:
-
template<class T>
concept NothrowRegular¶ - #include <regular.hpp>