10#include "architecture.hpp"
128template<>
struct make_string<char8_t> {
using type = std::u8string; };
150template<
typename T,
typename U>
152 using type =
decltype(
static_cast<T
>(0) +
static_cast<U
>(0));
155template<
typename T,
typename U>
156using make_promote_t =
typename make_promote<T,U>::type;
158template<
typename T,
typename Ei=
void>
160 using type = uintmax_t;
164struct make_intmax<T,
std::enable_if_t<std::is_integral_v<T> && std::is_unsigned_v<T>>> {
165 using type = uintmax_t;
169struct make_intmax<T,
std::enable_if_t<std::is_integral_v<T> && std::is_signed_v<T>>> {
170 using type = intmax_t;
174using make_intmax_t =
typename make_intmax<T>::type;
206#if (TT_COMPILER == TT_CC_CLANG || TT_COMPILER == TT_CC_GCC) && (TT_PROCESSOR == TT_CPU_X64)
210template<>
struct make_uintxx<128> {
using type =
unsigned __int128; };
243template<
typename To,
typename From,
typename Ei=
void>
246template<
typename To,
typename From>
247struct copy_cv<To,From,
std::enable_if_t<!std::is_const_v<From> && !std::is_volatile_v<From>>> {
248 using type = std::remove_cv_t<To>;
251template<
typename To,
typename From>
252struct copy_cv<To,From,
std::enable_if_t<!std::is_const_v<From> && std::is_volatile_v<From>>> {
253 using type = std::remove_cv_t<To>
volatile;
256template<
typename To,
typename From>
257struct copy_cv<To,From,
std::enable_if_t<std::is_const_v<From> && !std::is_volatile_v<From>>> {
258 using type = std::remove_cv_t<To>
const;
261template<
typename To,
typename From>
262struct copy_cv<To,From,
std::enable_if_t<std::is_const_v<From> && std::is_volatile_v<From>>> {
263 using type = std::remove_cv_t<To>
const volatile;
268template<
typename To,
typename From>
273 template <
typename C>
static std::true_type test(
typename C::value_type *);
276 static const bool value = std::is_same_v<decltype(test<T>(
nullptr)),
std::true_type>;
284 template <
typename C>
static std::true_type test(
decltype(&C::add_callback) func_ptr);
287 static const bool value = std::is_same_v<decltype(test<T>(
nullptr)),
std::true_type>;
293template<
typename BaseType,
typename DerivedType>
296template<
typename BaseType,
typename DerivedType>
299template<
typename DerivedType,
typename BaseType>
302template<
typename DerivedType,
typename BaseType>
305template<
typename DerivedType,
typename BaseType>
308template<
typename DerivedType,
typename BaseType>
311template<
typename T1,
typename T2>
312constexpr bool is_different_v = !std::is_same_v<T1,T2>;
323template<
typename First,
typename Second>
328template<
typename First,
typename Second>
351#define tt_call_method(object, method, ...) \
353 if constexpr (acts_as_pointer_v<decltype(object)>) { \
354 return object->method(__VA_ARGS__); \
356 return object.method(__VA_ARGS__); \
constexpr bool is_character_v
Definition type_traits.hpp:121
constexpr bool is_numeric_unsigned_integral_v
Definition type_traits.hpp:57
typename make_string_view< T >::type make_string_view_t
type-trait to convert a character to a string_view type.
Definition type_traits.hpp:148
constexpr bool is_numeric_v
Definition type_traits.hpp:109
typename make_string< T >::type make_string_t
type-trait to convert a character to a string type.
Definition type_traits.hpp:134
typename copy_cv< To, From >::type copy_cv_t
Type-trait to copy const volatile qualifiers from one type to another.
Definition type_traits.hpp:269
constexpr bool is_numeric_integral_v
Definition type_traits.hpp:81
constexpr bool is_numeric_signed_integral_v
Definition type_traits.hpp:38
Is a numeric signed integer.
Definition type_traits.hpp:28
Is a numeric unsigned integer.
Definition type_traits.hpp:47
Is a numeric integer.
Definition type_traits.hpp:67
Is a numeric.
Definition type_traits.hpp:92
Definition type_traits.hpp:111
type-trait to convert a character to a string type.
Definition type_traits.hpp:125
type-trait to convert a character to a string_view type.
Definition type_traits.hpp:138
Definition type_traits.hpp:151
Definition type_traits.hpp:159
Has an signed integer of a specific size.
Definition type_traits.hpp:179
Has an unsigned integer of a specific size.
Definition type_traits.hpp:184
Has an float of a specific size.
Definition type_traits.hpp:189
Make an signed integer.
Definition type_traits.hpp:194
Make an unsigned integer.
Definition type_traits.hpp:199
Make an floating point.
Definition type_traits.hpp:204
Type-trait to copy const volitile qualifiers from one type to another.
Definition type_traits.hpp:244
Definition type_traits.hpp:272
Definition type_traits.hpp:283
Definition type_traits.hpp:294
Definition type_traits.hpp:300
Definition type_traits.hpp:306
Definition type_traits.hpp:315
Definition type_traits.hpp:324
Definition type_traits.hpp:332