---- kpp::one_of << Basic Concepts << Type System << Kpp c++ ----
kpp::one_of is a c++ concept of kpp c++ library. kpp::one_of is used for constraint that a type is any one of a list of types.
kpp::one_of is used to design the kpp basic types, by picking a specific type from a list of types, if no type is satisfied, the trait returns kpp::overflow_type. It can be used for general purpose too.
kpp::one_of Sig:
template <typename type_t00, typename ... type_list> concept one_of = ...;
#include <kpp/types.hpp>
#include <kpp/types.hpp> template <kpp::one_of<int, float, char> type_t00> class test { }; int main() { auto obj = test<int>{}; // test<int &>{}; // failed }