52template<>
struct make_string<char8_t> {
using type = std::u8string; };
73using make_string_view_t =
typename make_string_view<T>::type;
75template<
typename T,
typename U>
77 using type =
decltype(
static_cast<T
>(0) +
static_cast<U
>(0));
80template<
typename T,
typename U>
81using make_promote_t =
typename make_promote<T,U>::type;
83template<
typename T,
typename Ei=
void>
85 using type = uintmax_t;
89struct make_intmax<T,
std::enable_if_t<std::is_integral_v<T> && std::is_unsigned_v<T>>> {
90 using type = uintmax_t;
94struct make_intmax<T,
std::enable_if_t<std::is_integral_v<T> && std::is_signed_v<T>>> {
95 using type = intmax_t;
99using make_intmax_t =
typename make_intmax<T>::type;
104template<>
struct make_larger<signed long> {
using type =
signed long long; };
105template<>
struct make_larger<signed int> {
using type =
signed long; };
106template<>
struct make_larger<signed short> {
using type =
signed int; };
107template<>
struct make_larger<signed char> {
using type =
signed short; };
108template<>
struct make_larger<unsigned long> {
using type =
unsigned long long; };
109template<>
struct make_larger<unsigned int> {
using type =
unsigned long; };
110template<>
struct make_larger<unsigned short> {
using type =
unsigned int; };
111template<>
struct make_larger<unsigned char> {
using type =
unsigned short; };
112template<>
struct make_larger<double> {
using type =
long double; };
118using make_larger_t =
typename make_larger<T>::type;
122template<
typename To,
typename From,
typename Ei=
void>
125template<
typename To,
typename From>
126struct copy_cv<To,From,
std::enable_if_t<!std::is_const_v<From> && !std::is_volatile_v<From>>> {
127 using type = std::remove_cv_t<To>;
130template<
typename To,
typename From>
131struct copy_cv<To,From,
std::enable_if_t<!std::is_const_v<From> && std::is_volatile_v<From>>> {
132 using type = std::remove_cv_t<To>
volatile;
135template<
typename To,
typename From>
136struct copy_cv<To,From,
std::enable_if_t<std::is_const_v<From> && !std::is_volatile_v<From>>> {
137 using type = std::remove_cv_t<To>
const;
140template<
typename To,
typename From>
141struct copy_cv<To,From,
std::enable_if_t<std::is_const_v<From> && std::is_volatile_v<From>>> {
142 using type = std::remove_cv_t<To>
const volatile;
147template<
typename To,
typename From>
152 template <
typename C>
static std::true_type test(
typename C::value_type *);
155 static const bool value = std::is_same_v<decltype(test<T>(
nullptr)),
std::true_type>;
163 template <
typename C>
static std::true_type test(
decltype(&C::add_callback) func_ptr);
166 static const bool value = std::is_same_v<decltype(test<T>(
nullptr)),
std::true_type>;
172template<
typename BaseType,
typename DerivedType>
175template<
typename BaseType,
typename DerivedType>
178template<
typename DerivedType,
typename BaseType>
181template<
typename DerivedType,
typename BaseType>
184template<
typename DerivedType,
typename BaseType>
187template<
typename DerivedType,
typename BaseType>
190template<
typename T1,
typename T2>
191constexpr bool is_different_v = !std::is_same_v<T1,T2>;
203constexpr bool may_be_atomic_v = std::is_trivially_copyable_v<T> and std::is_copy_constructible_v<T> and
204 std::is_move_constructible_v<T> and std::is_copy_assignable_v<T> and
205 std::is_move_assignable_v<T>;
207template<
typename First,
typename Second>
212template<
typename First,
typename Second>
235#define tt_call_method(object, method, ...) \
237 if constexpr (acts_as_pointer_v<decltype(object)>) { \
238 return object->method(__VA_ARGS__); \
240 return object.method(__VA_ARGS__); \
Definition type_traits.hpp:16
Definition type_traits.hpp:34
type-trait to convert a character to a string type.
Definition type_traits.hpp:49
type-trait to convert a character to a string_view type.
Definition type_traits.hpp:63
Definition type_traits.hpp:76
Definition type_traits.hpp:84
Type-trait to increase the size of an integral type.
Definition type_traits.hpp:103
Type-trait to copy const volitile qualifiers from one type to another.
Definition type_traits.hpp:123
Definition type_traits.hpp:151
Definition type_traits.hpp:162
Definition type_traits.hpp:173
Definition type_traits.hpp:179
Definition type_traits.hpp:185
Definition type_traits.hpp:194
Definition type_traits.hpp:208
Definition type_traits.hpp:216