HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Variables
type_traits.hpp File Reference
#include "architecture.hpp"
#include <cstdint>
#include <type_traits>
#include <string>
#include <string_view>
#include <memory>
#include <variant>

Go to the source code of this file.

Data Structures

struct  v1::is_numeric_signed_integral< T >
 Is a numeric signed integer. More...
 
struct  v1::is_numeric_signed_integral< signed char >
 
struct  v1::is_numeric_signed_integral< signed short >
 
struct  v1::is_numeric_signed_integral< signed int >
 
struct  v1::is_numeric_signed_integral< signed long >
 
struct  v1::is_numeric_signed_integral< signed long long >
 
struct  v1::is_numeric_unsigned_integral< T >
 Is a numeric unsigned integer. More...
 
struct  v1::is_numeric_unsigned_integral< unsigned int >
 
struct  v1::is_numeric_unsigned_integral< unsigned char >
 
struct  v1::is_numeric_unsigned_integral< unsigned short >
 
struct  v1::is_numeric_unsigned_integral< unsigned long >
 
struct  v1::is_numeric_unsigned_integral< unsigned long long >
 
struct  v1::is_numeric_integral< T >
 Is a numeric integer. More...
 
struct  v1::is_numeric_integral< unsigned int >
 
struct  v1::is_numeric_integral< unsigned char >
 
struct  v1::is_numeric_integral< unsigned short >
 
struct  v1::is_numeric_integral< unsigned long >
 
struct  v1::is_numeric_integral< unsigned long long >
 
struct  v1::is_numeric_integral< signed char >
 
struct  v1::is_numeric_integral< signed short >
 
struct  v1::is_numeric_integral< signed int >
 
struct  v1::is_numeric_integral< signed long >
 
struct  v1::is_numeric_integral< signed long long >
 
struct  v1::is_numeric< T >
 Is a numeric. More...
 
struct  v1::is_numeric< unsigned char >
 
struct  v1::is_numeric< unsigned short >
 
struct  v1::is_numeric< unsigned int >
 
struct  v1::is_numeric< unsigned long >
 
struct  v1::is_numeric< unsigned long long >
 
struct  v1::is_numeric< signed char >
 
struct  v1::is_numeric< signed short >
 
struct  v1::is_numeric< signed int >
 
struct  v1::is_numeric< signed long >
 
struct  v1::is_numeric< signed long long >
 
struct  v1::is_numeric< float >
 
struct  v1::is_numeric< double >
 
struct  v1::is_numeric< long double >
 
struct  v1::is_character< T >
 
struct  v1::is_character< char >
 
struct  v1::is_character< wchar_t >
 
struct  v1::is_character< char8_t >
 
struct  v1::is_character< char16_t >
 
struct  v1::is_character< char32_t >
 
struct  v1::make_string< T >
 type-trait to convert a character to a string type. More...
 
struct  v1::make_string< char >
 
struct  v1::make_string< wchar_t >
 
struct  v1::make_string< char8_t >
 
struct  v1::make_string< char16_t >
 
struct  v1::make_string< char32_t >
 
struct  v1::make_string_view< T >
 type-trait to convert a character to a string_view type. More...
 
struct  v1::make_string_view< char >
 
struct  v1::make_string_view< wchar_t >
 
struct  v1::make_string_view< char8_t >
 
struct  v1::make_string_view< char16_t >
 
struct  v1::make_string_view< char32_t >
 
struct  v1::make_promote< T, U >
 
struct  v1::make_intmax< T, Ei >
 
struct  v1::make_intmax< T >
 
struct  v1::has_intxx< N >
 Has an signed integer of a specific size. More...
 
struct  v1::has_uintxx< N >
 Has an unsigned integer of a specific size. More...
 
struct  v1::has_floatxx< N >
 Has an float of a specific size. More...
 
struct  v1::make_intxx< N >
 Make an signed integer. More...
 
struct  v1::make_uintxx< N >
 Make an unsigned integer. More...
 
struct  v1::make_floatxx< N >
 Make an floating point. More...
 
struct  v1::has_intxx< 128 >
 
struct  v1::has_uintxx< 128 >
 
struct  v1::make_intxx< 128 >
 
struct  v1::make_uintxx< 128 >
 
struct  v1::has_intxx< 64 >
 
struct  v1::has_uintxx< 64 >
 
struct  v1::has_floatxx< 64 >
 
struct  v1::make_intxx< 64 >
 
struct  v1::make_uintxx< 64 >
 
struct  v1::make_floatxx< 64 >
 
struct  v1::has_intxx< 32 >
 
struct  v1::has_uintxx< 32 >
 
struct  v1::has_floatxx< 32 >
 
struct  v1::make_intxx< 32 >
 
struct  v1::make_uintxx< 32 >
 
struct  v1::make_floatxx< 32 >
 
struct  v1::has_intxx< 16 >
 
struct  v1::has_uintxx< 16 >
 
struct  v1::make_intxx< 16 >
 
struct  v1::make_uintxx< 16 >
 
struct  v1::has_intxx< 8 >
 
struct  v1::has_uintxx< 8 >
 
struct  v1::make_intxx< 8 >
 
struct  v1::make_uintxx< 8 >
 
struct  v1::copy_cv< To, From, Ei >
 Type-trait to copy const volitile qualifiers from one type to another. More...
 
struct  v1::copy_cv< To, From >
 
struct  v1::has_value_type< T >
 
struct  v1::has_add_callback< T >
 
struct  v1::is_decayed_base_of< BaseType, DerivedType >
 
struct  v1::is_derived_from< DerivedType, BaseType >
 
struct  v1::is_decayed_derived_from< DerivedType, BaseType >
 
struct  v1::is_atomic< T >
 
struct  v1::is_atomic< std::atomic< T > >
 
struct  v1::use_first< First, Second >
 
struct  v1::acts_as_pointer< T >
 
struct  v1::acts_as_pointer< std::shared_ptr< T > >
 
struct  v1::acts_as_pointer< std::shared_ptr< T > && >
 
struct  v1::acts_as_pointer< std::shared_ptr< T > & >
 
struct  v1::acts_as_pointer< std::shared_ptr< T > const & >
 
struct  v1::acts_as_pointer< std::weak_ptr< T > >
 
struct  v1::acts_as_pointer< std::weak_ptr< T > && >
 
struct  v1::acts_as_pointer< std::weak_ptr< T > & >
 
struct  v1::acts_as_pointer< std::weak_ptr< T > const & >
 
struct  v1::acts_as_pointer< std::unique_ptr< T > >
 
struct  v1::acts_as_pointer< std::unique_ptr< T > && >
 
struct  v1::acts_as_pointer< std::unique_ptr< T > & >
 
struct  v1::acts_as_pointer< std::unique_ptr< T > const & >
 
struct  v1::acts_as_pointer< T * >
 
struct  v1::is_forward_of< T, Forward >
 True if T is a forwarded type of OfType. More...
 
struct  v1::is_forward_of< T, T >
 
struct  v1::is_forward_of< T, T const & >
 
struct  v1::is_forward_of< T, T & >
 
struct  v1::variant_decay< T >
 Decays types for use as elements in std::variant. More...
 
struct  v1::variant_decay< void >
 

Macros

#define hi_call_method(object, method, ...)
 

Typedefs

template<typename T >
using v1::make_string_t = typename make_string<T>::type
 type-trait to convert a character to a string type.
 
template<typename T >
using v1::make_string_view_t = typename make_string_view<T>::type
 type-trait to convert a character to a string_view type.
 
template<typename T , typename U >
using v1::make_promote_t = typename make_promote<T,U>::type
 
template<typename T >
using v1::make_intmax_t = typename make_intmax<T>::type
 
template<std::size_t N>
using v1::make_intxx_t = typename make_intxx<N>::type
 
template<std::size_t N>
using v1::make_uintxx_t = typename make_uintxx<N>::type
 
template<std::size_t N>
using v1::make_floatxx_t = typename make_floatxx<N>::type
 
template<typename To , typename From >
using v1::copy_cv_t = typename copy_cv<To,From>::type
 Type-trait to copy const volatile qualifiers from one type to another.
 
template<typename First , typename Second >
using v1::use_first_t = use_first<First,Second>
 
template<typename T >
using v1::variant_decay_t = variant_decay<T>::type
 

Variables

template<typename T >
constexpr bool v1::is_numeric_signed_integral_v = is_numeric_signed_integral<T>::value
 
template<typename T >
constexpr bool v1::is_numeric_unsigned_integral_v = is_numeric_unsigned_integral<T>::value
 
template<typename T >
constexpr bool v1::is_numeric_integral_v = is_numeric_integral<T>::value
 
template<typename T >
constexpr bool v1::is_numeric_v = is_numeric<T>::value
 
template<typename T >
constexpr bool v1::is_character_v = is_character<T>::value
 
template<std::size_t N>
constexpr bool v1::has_intxx_v = has_intxx<N>::value
 
template<std::size_t N>
constexpr bool v1::has_uintxx_v = has_uintxx<N>::value
 
template<std::size_t N>
constexpr bool v1::has_floatxx_v = has_floatxx<N>::value
 
template<typename T >
constexpr bool v1::has_value_type_v = has_value_type<T>::value
 
template<typename T >
constexpr bool v1::has_add_callback_v = has_add_callback<T>::value
 
template<typename BaseType , typename DerivedType >
constexpr bool v1::is_decayed_base_of_v = is_decayed_base_of<BaseType,DerivedType>::value
 
template<typename DerivedType , typename BaseType >
constexpr bool v1::is_derived_from_v = is_derived_from<DerivedType,BaseType>::value
 
template<typename DerivedType , typename BaseType >
constexpr bool v1::is_decayed_derived_from_v = is_decayed_derived_from<DerivedType,BaseType>::value
 
template<typename T1 , typename T2 >
constexpr bool v1::is_different_v = not std::is_same_v<std::remove_cvref_t<T1>,std::remove_cvref_t<T2>>
 If the types are different.
 
template<typename T >
constexpr bool v1::is_atomic_v = is_atomic<T>::value
 
template<typename T >
constexpr bool v1::acts_as_pointer_v = acts_as_pointer<T>::value
 
template<typename Out , typename In >
constexpr bool v1::type_in_range_v
 All values of numeric type In can be represented without loss of precision by numeric type Out.
 
template<typename T , typename Forward >
constexpr bool v1::is_forward_of_v = is_forward_of<T, Forward>::value
 

Macro Definition Documentation

◆ hi_call_method

#define hi_call_method ( object,
method,
... )
Value:
[&]() { \
if constexpr (acts_as_pointer_v<decltype(object)>) { \
return object->method(__VA_ARGS__); \
} else { \
return object.method(__VA_ARGS__); \
} \
}()

Typedef Documentation

◆ copy_cv_t

template<typename To , typename From >
using v1::copy_cv_t = typename copy_cv<To,From>::type

Type-trait to copy const volatile qualifiers from one type to another.

◆ make_string_t

template<typename T >
using v1::make_string_t = typename make_string<T>::type

type-trait to convert a character to a string type.

◆ make_string_view_t

template<typename T >
using v1::make_string_view_t = typename make_string_view<T>::type

type-trait to convert a character to a string_view type.

◆ variant_decay_t

template<typename T >
using v1::variant_decay_t = variant_decay<T>::type
See also
variant_decay

Variable Documentation

◆ is_character_v

template<typename T >
constexpr bool v1::is_character_v = is_character<T>::value
inlineconstexpr

True is the supplied type is a character integer. This distinguishes between integer characters and integer numbers.

◆ is_different_v

template<typename T1 , typename T2 >
constexpr bool v1::is_different_v = not std::is_same_v<std::remove_cvref_t<T1>,std::remove_cvref_t<T2>>
constexpr

If the types are different.

The two types are checked after removing const, volatile and reference qualifiers.

◆ is_numeric_integral_v

template<typename T >
constexpr bool v1::is_numeric_integral_v = is_numeric_integral<T>::value
inlineconstexpr
See also
is_numeric_integral

◆ is_numeric_signed_integral_v

template<typename T >
constexpr bool v1::is_numeric_signed_integral_v = is_numeric_signed_integral<T>::value
inlineconstexpr
See also
is_numeric_signed_integral

◆ is_numeric_unsigned_integral_v

template<typename T >
constexpr bool v1::is_numeric_unsigned_integral_v = is_numeric_unsigned_integral<T>::value
inlineconstexpr
See also
is_numeric_unsigned_integral

◆ is_numeric_v

template<typename T >
constexpr bool v1::is_numeric_v = is_numeric<T>::value
inlineconstexpr
See also
is_numeric

◆ type_in_range_v

template<typename Out , typename In >
constexpr bool v1::type_in_range_v
constexpr
Initial value:

All values of numeric type In can be represented without loss of precision by numeric type Out.