HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Namespaces | 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::is_character< char const >
 
struct  v1::is_character< wchar_t const >
 
struct  v1::is_character< char8_t const >
 
struct  v1::is_character< char16_t const >
 
struct  v1::is_character< char32_t const >
 
struct  v1::is_byte_like< T >
 An array of this type will implicitly create objects within that array. More...
 
struct  v1::is_byte_like< char >
 
struct  v1::is_byte_like< unsigned char >
 
struct  v1::is_byte_like< std::byte >
 
struct  v1::is_byte_like< char const >
 
struct  v1::is_byte_like< unsigned char const >
 
struct  v1::is_byte_like< std::byte const >
 
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_native_intxx< N >
 Has an signed integer of a specific size, natively supported by the compiler. More...
 
struct  v1::has_native_uintxx< N >
 Has an unsigned integer of a specific size, natively supported by the compiler. More...
 
struct  v1::has_native_floatxx< N >
 Has an float of a specific size, natively supported by the compiler. More...
 
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_native_intxx< 128 >
 
struct  v1::has_native_uintxx< 128 >
 
struct  v1::has_native_intxx< 64 >
 
struct  v1::has_native_uintxx< 64 >
 
struct  v1::has_native_floatxx< 64 >
 
struct  v1::has_native_intxx< 32 >
 
struct  v1::has_native_uintxx< 32 >
 
struct  v1::has_native_floatxx< 32 >
 
struct  v1::has_native_intxx< 16 >
 
struct  v1::has_native_uintxx< 16 >
 
struct  v1::has_native_intxx< 8 >
 
struct  v1::has_native_uintxx< 8 >
 
struct  v1::make_intxx< 128 >
 
struct  v1::make_uintxx< 128 >
 
struct  v1::make_intxx< 64 >
 
struct  v1::make_uintxx< 64 >
 
struct  v1::make_floatxx< 64 >
 
struct  v1::make_intxx< 32 >
 
struct  v1::make_uintxx< 32 >
 
struct  v1::make_floatxx< 32 >
 
struct  v1::make_intxx< 16 >
 
struct  v1::make_uintxx< 16 >
 
struct  v1::make_intxx< 8 >
 
struct  v1::make_uintxx< 8 >
 
struct  v1::common_integer< T, T >
 
struct  v1::common_integer< L, R >
 
struct  v1::common_integer< L, M, R... >
 
struct  v1::remove_cvptr< T >
 
struct  v1::copy_cv< To, From, Ei >
 Type-trait to copy const volatile 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::smart_pointer_traits< T >
 Smart pointer traits. More...
 
struct  v1::smart_pointer_traits< std::shared_ptr< T > >
 
struct  v1::smart_pointer_traits< std::weak_ptr< T > >
 
struct  v1::smart_pointer_traits< std::unique_ptr< T > >
 
struct  v1::smart_pointer_traits< T * >
 
struct  v1::is_forward_of< Context, Expected, FirstOtherExpected, OtherExpected... >
 
struct  v1::is_forward_of< Context, Expected >
 
struct  v1::is_forward_of< Context, std::shared_ptr< Expected > >
 
struct  v1::is_forward_of< Context, std::weak_ptr< Expected > >
 
struct  v1::is_forward_of< Context, std::unique_ptr< Expected > >
 
struct  v1::is_forward_of< Context, Expected * >
 
struct  v1::is_forward_of< Context, Result(Args...)>
 
struct  v1::forward_copy_or_ref< Context >
 
struct  v1::variant_decay< T >
 Decays types for use as elements in std::variant. More...
 
struct  v1::variant_decay< void >
 
struct  v1::overloaded< Ts >
 Helper type to turn a set of lambdas into a single overloaded type to pass to std::visit(). More...
 
struct  v1::default_values< T >
 A type traits for generating default values of a type. More...
 
struct  v1::default_values< T >
 

Namespaces

namespace  v1
 DOXYGEN BUG.
 

Macros

#define hi_call_method(object, method, ...)
 Call a method on a reference or a pointer object.
 

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<std::integral L, std::integral... R>
using v1::common_integer_t = common_integer<L, R...>::type
 Get an integer type that will fit all values from all template parameters.
 
template<typename T >
using v1::remove_cvptr_t = remove_cvptr<T>::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 Context >
using v1::forward_copy_or_ref_t = forward_copy_or_ref<Context>::type
 
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<typename T >
constexpr bool v1::is_byte_like_v = is_byte_like<T>::value
 An array of this type will implicitly create objects within that array.
 
template<std::size_t N>
constexpr bool v1::has_native_intxx_v = has_native_intxx<N>::value
 
template<std::size_t N>
constexpr bool v1::has_native_uintxx_v = has_native_uintxx<N>::value
 
template<std::size_t N>
constexpr bool v1::has_native_floatxx_v = has_native_floatxx<N>::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 Context , typename Expected >
constexpr bool v1::is_different_v = not std::is_same_v<std::decay_t<Context>,std::decay_t<Expected>>
 If the types are different.
 
template<typename T >
constexpr bool v1::is_atomic_v = is_atomic<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 range by numeric type Out.
 
template<typename Context , typename Expected , typename... OtherExpected>
constexpr bool v1::is_forward_of_v = is_forward_of<Context, Expected, OtherExpected...>::value
 
template<typename T >
constexpr bool v1::default_values_v = default_values<T>::value
 

Macro Definition Documentation

◆ hi_call_method

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

Call a method on a reference or a pointer object.

Parameters
objectA reference or pointer to an object with a method.
methodThe name of the method to call.
...Argument passed to the method.
Returns
The return value of the method.