31 #ifdef EMLABCPP_USE_DEMANGLING
41 template <
typename T >
48 template <
typename Container,
typename UnaryCallable >
51 template < gettable_container Container,
typename UnaryCallable >
52 requires( !range_container< Container > )
55 using type = decltype( std::declval< UnaryCallable >()(
56 std::get< 0 >( std::declval< Container >() ) ) );
59 template < range_container Container,
typename UnaryCallable >
62 using type = decltype( std::declval< UnaryCallable >()(
63 *std::begin( std::declval< Container >() ) ) );
66 template <
typename Container,
typename UnaryCallable >
81 #ifdef EMLABCPP_USE_OSTREAM
92 template <
typename T >
95 #ifdef EMLABCPP_USE_DEMANGLING
98 char*
const dname = abi::__cxa_demangle(
typeid( T ).name(),
nullptr,
nullptr, &tmp );
102 #elif defined EMLABCPP_USE_TYPEID
103 std::string_view
const res =
typeid( T ).name();
105 std::string_view
const res =
"type names not supported";
112 template < std::
size_t >
115 template < std::
size_t N >
119 using type = uint8_t;
122 template < std::
size_t N >
126 using type = uint16_t;
129 template < std::
size_t N >
133 using type = uint32_t;
136 template < std::
size_t N >
140 using type = uint64_t;
143 template < std::
size_t N >
148 template <
typename,
template <
typename >
class >
151 template <
typename... Ts,
template <
typename >
class Fun >
154 using type = std::tuple< Fun< Ts >... >;
157 template <
typename T,
template <
typename >
class Fun >
162 template <
typename T >
170 template <
typename T,
typename Variant >
173 template <
typename T,
typename... Ts >
176 static constexpr std::size_t value =
177 std::variant< type_tag< Ts >... >(
type_tag< T >() ).index();
182 template <
typename T,
typename Variant >
MIT License.
Definition: impl.h:31
auto pretty_type_name()
Definition: types.h:93
std::tuple< Fun< Ts >... > type
Definition: types.h:154
T res
Definition: algorithm.h:505
T type
Definition: types.h:165
requires(!range_container< Container >) const expr std
Returns index of an element in tuple 't', for which call to predicate f(x) holds true,...
Definition: algorithm.h:127
typename mapped< Container, UnaryCallable >::type mapped_t
Definition: types.h:67
UnaryCallable
Definition: types.h:54
typename select_utype< N >::type select_utype_t
Definition: types.h:144
constexpr bool has_static_size_v
Definition: types.h:42
index_of< T, Variant >::value index_of_v
Definition: types.h:183
std::ostream & operator<<(std::ostream &os, string_buffer< N > const &sb)
Definition: string_buffer.h:112
N
Definition: static_storage.h:97
typename type_map< T, Fun >::type type_map_t
Definition: types.h:158
decltype(std::declval< UnaryCallable >()(*std::begin(std::declval< Container >()))) type
Definition: types.h:63
decltype(V) value_type
Definition: types.h:74
constexpr friend auto operator<=>(tag const &, tag const &)=default
static constexpr value_type value
Definition: types.h:76