25#include <unordered_set>
26#include <unordered_map>
49template<
typename T,
template<
typename...>
typename U>
57template<
template<
typename...>
typename U,
typename... Args>
71template<
typename T,
template<
typename...>
typename U>
103concept Boolean = std::convertible_to<std::remove_cvref_t<T>,
bool>
106 { !t } -> std::convertible_to<bool>;
134concept Enum = std::is_enum_v<T>;
136enum TestEnum { VALUE1, VALUE2 };
137enum class TestEnumClass { VALUE1, VALUE2 };
138static_assert( Enum<TestEnum>);
139static_assert( Enum<TestEnumClass>);
140static_assert(!Enum<int>);
141static_assert(!Enum<std::string>);
171template <
typename T,
typename... Args>
197template<
typename T,
typename... U>
198concept Uniform = ( std::same_as<std::remove_cvref_t<T>, std::remove_cvref_t<U>> and ... );
256template <
typename T,
typename U>
259 typename T::value_type;
260 requires std::same_as<typename T::value_type, U>;
389concept Numeric = std::integral<std::remove_cvref_t<T>> or std::floating_point<std::remove_cvref_t<T>>;
419 { os << t } -> std::same_as<std::ostream&>;
Concept for types that can be contextually converted to bool.
Concept for standard library container types.
Concept for enumeration types.
Concept for containers holding a specific value type.
Concept to check if a type is an instance of a specific template.
Concept for std::optional types.
Concept for std::vector types.
Concept for iterable containers (has begin() and end())
Concept for numeric types (integral or floating-point)
Concept for scoped enumeration types (enum class)
Concept for types that support stream insertion (operator<<)
Concept for types that can construct a std::string.
Concept for types implicitly convertible to std::string.
Concept for types that can be represented as a string.
Concept for std::variant types.
C++ concepts for type constraints and compile-time validation.
constexpr bool is_instance_of_v
Type trait to check if a type is an instance of a template.