#ifndef seafire__protocol__traits_hxx_ #define seafire__protocol__traits_hxx_ #include namespace seafire::protocol::traits { /// Check if T has an alias type defined. /// template> struct has_alias_type : std::false_type {}; template struct has_alias_type< T, std::void_t< decltype(std::declval()) > > : std::true_type {}; /// Helper variable for has_alias_type. /// template inline constexpr bool has_alias_type_v = has_alias_type::value; /// Access the alias type of T, if available, otherwise T. /// template> struct alias_type { using type = T; }; template struct alias_type { using type = typename T::alias_type; }; /// Helper for alias_type. /// template using alias_type_t = typename alias_type::type; template> struct has_overridden_to_string : std::false_type {}; template struct has_overridden_to_string< T, std::void_t< decltype(T::to_string(std::declval>())) > > : std::true_type {}; template inline constexpr bool has_overridden_to_string_v{ has_overridden_to_string::value }; } // seafire::protocol::traits #endif