17namespace hi::inline v1 {
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;
163template<std::
unsigned_
integral T>
165 using type = uintmax_t;
168template<std::
signed_
integral T>
170 using type = intmax_t;
174using make_intmax_t =
typename make_intmax<T>::type;
206#if (HI_COMPILER == HI_CC_CLANG || HI_COMPILER == HI_CC_GCC) && (HI_PROCESSOR == HI_CPU_X64)
210template<>
struct make_uintxx<128> {
using type =
unsigned __int128; };
243template<
typename To,
typename From,
typename Ei=
void>
246template<
typename To,
typename From>
requires(not std::is_const_v<From> and not std::is_volatile_v<From>)
248 using type = std::remove_cv_t<To>;
251template<
typename To,
typename From>
requires(not std::is_const_v<From> and std::is_volatile_v<From>)
253 using type = std::remove_cv_t<To>
volatile;
256template<
typename To,
typename From>
requires(std::is_const_v<From> and not std::is_volatile_v<From>)
257struct copy_cv<To,From> {
258 using type = std::remove_cv_t<To>
const;
261template<
typename To,
typename From>
requires(std::is_const_v<From> and std::is_volatile_v<From>)
262struct copy_cv<To,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>
314template<
typename T1,
typename T2>
315constexpr bool is_different_v = not std::is_same_v<std::remove_cvref_t<T1>,std::remove_cvref_t<T2>>;
326template<
typename First,
typename Second>
331template<
typename First,
typename Second>
354#define hi_call_method(object, method, ...) \
356 if constexpr (acts_as_pointer_v<decltype(object)>) { \
357 return object->method(__VA_ARGS__); \
359 return object.method(__VA_ARGS__); \
367template<
typename Out,
typename In>
380template<
typename T,
typename Forward>
394template<
typename T,
typename Forward>
403 using type =
decltype(std::declval<T>().await_resume());
constexpr bool is_numeric_v
Definition type_traits.hpp:109
constexpr bool is_different_v
If the types are different.
Definition type_traits.hpp:315
typename make_string< T >::type make_string_t
type-trait to convert a character to a string type.
Definition type_traits.hpp:134
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_unsigned_integral_v
Definition type_traits.hpp:57
await_resume_result< T >::type await_resume_result_t
Get the result type of an awaitable.
Definition type_traits.hpp:411
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 type_in_range_v
All values of numeric type In can be represented without loss of precision by numeric type Out.
Definition type_traits.hpp:368
constexpr bool is_character_v
Definition type_traits.hpp:121
constexpr bool is_numeric_signed_integral_v
Definition type_traits.hpp:38
Functions and macros for handling architectural difference between compilers, CPUs and operating syst...
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:318
Definition type_traits.hpp:327
Definition type_traits.hpp:335
True if T is a forwarded type of OfType.
Definition type_traits.hpp:381
Get the result type of an awaitable.
Definition type_traits.hpp:402