#ifndef Rice__detail__traits__hpp_ #define Rice__detail__traits__hpp_ #include #include #include #include namespace Rice { namespace detail { // Get the base_type of T - without pointer, reference, const or volatile template using intrinsic_type = typename std::remove_cv_t>>; // Recursively remove const/volatilr template struct remove_cv_recursive { using type = T; }; template struct remove_cv_recursive { using type = typename remove_cv_recursive::type; }; template struct remove_cv_recursive { using type = typename remove_cv_recursive::type; }; template struct remove_cv_recursive { using type = typename remove_cv_recursive::type; }; template struct remove_cv_recursive { using type = typename remove_cv_recursive::type&; }; /* template struct remove_cv_recursive { using type = typename remove_cv_recursive::type&&; };*/ template struct remove_cv_recursive { using type = typename remove_cv_recursive::type*; }; template using remove_cv_recursive_t = typename remove_cv_recursive::type; // Does the Type work with ostreams? This is used to implement #to_s template struct is_ostreamable : std::false_type {}; template struct is_ostreamable() << std::declval())>> : std::true_type {}; template constexpr bool is_ostreamable_v = is_ostreamable::value; // Is the type comparable? template struct is_comparable : std::false_type {}; template struct is_comparable() == std::declval())>> : std::true_type {}; template constexpr bool is_comparable_v = is_comparable::value; template struct is_comparable> { static const bool value = is_comparable_v && is_comparable_v; }; template struct is_comparable> { static const bool value = is_comparable_v; }; // -- Tuple Helpers --- template struct tuple_shift; template struct tuple_shift> { using type = std::tuple; }; template typename T, typename...Arg_Ts> struct tuple_map; template typename T, typename...Arg_Ts> struct tuple_map> { using type = std::tuple>...>; }; } // detail } // Rice #endif // Rice__detail__traits__hpp_