C++ named requirements: BinaryTypeTrait (since C++11) (original) (raw)

A BinaryTypeTrait is a class template that describes a relationship between its two template type parameters with a std::integral_constant (typically std::bool_constant) specialization.

[edit] Requirements

[edit] Standard library

The following standard library class templates satisfy BinaryTypeTrait:

is_same(C++11) checks if two types are the same (class template) [edit]
is_base_of(C++11) checks if a type is a base of the other type (class template) [edit]
is_virtual_base_of(C++26) checks if a type is a virtual base of the other type (class template) [edit]
is_convertibleis_nothrow_convertible(C++11)(C++20) checks if a type can be converted to the other type (class template) [edit]
is_layout_compatible(C++20) checks if two types are layout-compatible (class template) [edit]
is_pointer_interconvertible_base_of(C++20) checks if a type is a pointer-interconvertible (initial) base of another type (class template) [edit]
is_invocableis_invocable_ris_nothrow_invocableis_nothrow_invocable_r(C++17) checks if a type can be invoked (as if by std::invoke) with the given argument types (class template) [edit]
uses_allocator(C++11) checks if the specified type supports uses-allocator construction (class template) [edit]