QtBase  v6.3.1
Classes | Macros | Typedefs | Functions | Variables
hb-meta.hh File Reference
#include "hb.hh"
#include <memory>
#include <type_traits>
#include <utility>
Include dependency graph for hb-meta.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hb_empty_t
 
struct  _hb_void_t< Ts >
 
struct  _hb_head_t< Head, Ts >
 
struct  hb_integral_constant< T, v >
 
struct  static_assert_expr< true >
 
struct  hb_enable_if< B, T >
 
struct  hb_enable_if< true, T >
 
struct  hb_is_same< T, T2 >
 
struct  hb_is_same< T, T >
 
struct  hb_priority< Pri >
 
struct  hb_priority< 0 >
 
struct  hb_type_identity_t< T >
 
struct  hb_match_const< T >
 
struct  hb_match_const< const T >
 
struct  hb_match_reference< T >
 
struct  hb_match_reference< T & >
 
struct  hb_match_reference< T && >
 
struct  hb_match_pointer< T >
 
struct  hb_match_pointer< T * >
 
struct  hb_reference_wrapper< T >
 
struct  hb_reference_wrapper< T & >
 
struct  hb_int_min< char >
 
struct  hb_int_min< signed char >
 
struct  hb_int_min< unsigned char >
 
struct  hb_int_min< signed short >
 
struct  hb_int_min< unsigned short >
 
struct  hb_int_min< signed int >
 
struct  hb_int_min< unsigned int >
 
struct  hb_int_min< signed long >
 
struct  hb_int_min< unsigned long >
 
struct  hb_int_min< signed long long >
 
struct  hb_int_min< unsigned long long >
 
struct  hb_int_min< T * >
 
struct  hb_int_max< char >
 
struct  hb_int_max< signed char >
 
struct  hb_int_max< unsigned char >
 
struct  hb_int_max< signed short >
 
struct  hb_int_max< unsigned short >
 
struct  hb_int_max< signed int >
 
struct  hb_int_max< unsigned int >
 
struct  hb_int_max< signed long >
 
struct  hb_int_max< unsigned long >
 
struct  hb_int_max< signed long long >
 
struct  hb_int_max< unsigned long long >
 
struct  _hb_unwrap_type< T, typename >
 
struct  _hb_unwrap_type< T, hb_void_t< typename T::type > >
 

Macros

#define static_assert_expr(C)   static_assert_expr<C>::value
 
#define hb_enable_if(Cond)   typename hb_enable_if<(Cond)>::type* = nullptr
 
#define hb_requires(Cond)   hb_enable_if((Cond))
 
#define hb_is_same(T, T2)   hb_is_same<T, T2>::value
 
#define HB_RETURN(Ret, E)   -> hb_head_t<Ret, decltype ((E))> { return (E); }
 
#define HB_AUTO_RETURN(E)   -> decltype ((E)) { return (E); }
 
#define HB_VOID_RETURN(E)   -> hb_void_t<decltype ((E))> { (E); }
 
#define hb_prioritize   hb_priority<16> ()
 
#define HB_FUNCOBJ(x)   static_const x HB_UNUSED
 
#define hb_declval(T)   (hb_declval<T> ())
 
#define hb_is_convertible(From, To)   std::is_convertible<From, To>::value
 
#define hb_is_cr_convertible(From, To)   hb_is_cr_convertible<From, To>::value
 
#define hb_int_min(T)   hb_int_min<T>::value
 
#define hb_int_max(T)   hb_int_max<T>::value
 
#define HB_DELETE_COPY_ASSIGN(TypeName)
 
#define HB_DELETE_CREATE_COPY_ASSIGN(TypeName)
 
#define hb_unwrap_type(T)   typename hb_unwrap_type<T>::type
 

Typedefs

template<typename... Ts>
using hb_void_t = typename _hb_void_t< Ts... >::type
 
template<typename... Ts>
using hb_head_t = typename _hb_head_t< Ts... >::type
 
template<bool b>
using hb_bool_constant = hb_integral_constant< bool, b >
 
using hb_true_type = hb_bool_constant< true >
 
using hb_false_type = hb_bool_constant< false >
 
template<typename T >
using hb_type_identity = typename hb_type_identity_t< T >::type
 
template<typename T >
using hb_remove_const = typename hb_match_const< T >::type
 
template<typename T >
using hb_remove_reference = typename hb_match_reference< T >::type
 
template<typename T >
using hb_add_lvalue_reference = decltype(_hb_try_add_lvalue_reference< T >(hb_prioritize))
 
template<typename T >
using hb_add_rvalue_reference = decltype(_hb_try_add_rvalue_reference< T >(hb_prioritize))
 
template<typename T >
using hb_remove_pointer = typename hb_match_pointer< T >::type
 
template<typename T >
using hb_add_pointer = decltype(_hb_try_add_pointer< T >(hb_prioritize))
 
template<typename T >
using hb_decay = hb_remove_const< hb_remove_reference< T > >
 
template<typename From , typename To >
using hb_is_cr_convertible = hb_bool_constant< hb_is_same(hb_decay< From >, hb_decay< To >) &&(!std::is_const< From >::value||std::is_const< To >::value) &&(!std::is_reference< To >::value||std::is_const< To >::value||std::is_reference< To >::value) >
 
template<typename T >
using hb_unwrap_type = _hb_unwrap_type< T, void >
 

Functions

template<typename T >
auto _hb_try_add_lvalue_reference (hb_priority< 1 >) -> hb_type_identity< T & >
 
template<typename T >
auto _hb_try_add_lvalue_reference (hb_priority< 0 >) -> hb_type_identity< T >
 
template<typename T >
auto _hb_try_add_rvalue_reference (hb_priority< 1 >) -> hb_type_identity< T && >
 
template<typename T >
auto _hb_try_add_rvalue_reference (hb_priority< 0 >) -> hb_type_identity< T >
 
template<typename T >
auto _hb_try_add_pointer (hb_priority< 1 >) -> hb_type_identity< hb_remove_reference< T > * >
 
struct {
HB_FUNCOBJ (hb_deref)
 

Variables

struct hb_reference_wrapper HB_FUNCOBJ
 

Macro Definition Documentation

◆ HB_AUTO_RETURN

#define HB_AUTO_RETURN (   E)    -> decltype ((E)) { return (E); }

Definition at line 76 of file hb-meta.hh.

◆ hb_declval

#define hb_declval (   T)    (hb_declval<T> ())

Definition at line 90 of file hb-meta.hh.

◆ HB_DELETE_COPY_ASSIGN

#define HB_DELETE_COPY_ASSIGN (   TypeName)
Value:
TypeName(const TypeName&) = delete; \
void operator=(const TypeName&) = delete

Definition at line 194 of file hb-meta.hh.

◆ HB_DELETE_CREATE_COPY_ASSIGN

#define HB_DELETE_CREATE_COPY_ASSIGN (   TypeName)
Value:
TypeName() = delete; \
TypeName(const TypeName&) = delete; \
void operator=(const TypeName&) = delete

Definition at line 197 of file hb-meta.hh.

◆ hb_enable_if

#define hb_enable_if (   Cond)    typename hb_enable_if<(Cond)>::type* = nullptr

Definition at line 65 of file hb-meta.hh.

◆ HB_FUNCOBJ

#define HB_FUNCOBJ (   x)    static_const x HB_UNUSED

Definition at line 83 of file hb-meta.hh.

◆ hb_int_max

#define hb_int_max (   T)    hb_int_max<T>::value

Definition at line 189 of file hb-meta.hh.

◆ hb_int_min

#define hb_int_min (   T)    hb_int_min<T>::value

Definition at line 176 of file hb-meta.hh.

◆ hb_is_convertible

#define hb_is_convertible (   From,
  To 
)    std::is_convertible<From, To>::value

Definition at line 118 of file hb-meta.hh.

◆ hb_is_cr_convertible

#define hb_is_cr_convertible (   From,
  To 
)    hb_is_cr_convertible<From, To>::value

Definition at line 126 of file hb-meta.hh.

◆ hb_is_same

#define hb_is_same (   T,
  T2 
)    hb_is_same<T, T2>::value

Definition at line 71 of file hb-meta.hh.

◆ hb_prioritize

#define hb_prioritize   hb_priority<16> ()

Definition at line 81 of file hb-meta.hh.

◆ hb_requires

#define hb_requires (   Cond)    hb_enable_if((Cond))

Definition at line 67 of file hb-meta.hh.

◆ HB_RETURN

#define HB_RETURN (   Ret,
 
)    -> hb_head_t<Ret, decltype ((E))> { return (E); }

Definition at line 75 of file hb-meta.hh.

◆ hb_unwrap_type

#define hb_unwrap_type (   T)    typename hb_unwrap_type<T>::type

Definition at line 212 of file hb-meta.hh.

◆ HB_VOID_RETURN

#define HB_VOID_RETURN (   E)    -> hb_void_t<decltype ((E))> { (E); }

Definition at line 77 of file hb-meta.hh.

◆ static_assert_expr

Definition at line 59 of file hb-meta.hh.

Typedef Documentation

◆ hb_add_lvalue_reference

template<typename T >
using hb_add_lvalue_reference = decltype (_hb_try_add_lvalue_reference<T> (hb_prioritize))

Definition at line 102 of file hb-meta.hh.

◆ hb_add_pointer

template<typename T >
using hb_add_pointer = decltype (_hb_try_add_pointer<T> (hb_prioritize))

Definition at line 112 of file hb-meta.hh.

◆ hb_add_rvalue_reference

template<typename T >
using hb_add_rvalue_reference = decltype (_hb_try_add_rvalue_reference<T> (hb_prioritize))

Definition at line 105 of file hb-meta.hh.

◆ hb_bool_constant

template<bool b>
using hb_bool_constant = hb_integral_constant<bool, b>

Definition at line 52 of file hb-meta.hh.

◆ hb_decay

template<typename T >
using hb_decay = hb_remove_const<hb_remove_reference<T> >

Definition at line 116 of file hb-meta.hh.

◆ hb_false_type

Definition at line 54 of file hb-meta.hh.

◆ hb_head_t

template<typename... Ts>
using hb_head_t = typename _hb_head_t<Ts...>::type

Definition at line 49 of file hb-meta.hh.

◆ hb_is_cr_convertible

template<typename From , typename To >
using hb_is_cr_convertible = hb_bool_constant< hb_is_same (hb_decay<From>, hb_decay<To>) && (!std::is_const<From>::value || std::is_const<To>::value) && (!std::is_reference<To>::value || std::is_const<To>::value || std::is_reference<To>::value) >

Definition at line 121 of file hb-meta.hh.

◆ hb_remove_const

template<typename T >
using hb_remove_const = typename hb_match_const<T>::type

Definition at line 94 of file hb-meta.hh.

◆ hb_remove_pointer

template<typename T >
using hb_remove_pointer = typename hb_match_pointer<T>::type

Definition at line 109 of file hb-meta.hh.

◆ hb_remove_reference

template<typename T >
using hb_remove_reference = typename hb_match_reference<T>::type

Definition at line 99 of file hb-meta.hh.

◆ hb_true_type

Definition at line 53 of file hb-meta.hh.

◆ hb_type_identity

template<typename T >
using hb_type_identity = typename hb_type_identity_t<T>::type

Definition at line 87 of file hb-meta.hh.

◆ hb_unwrap_type

template<typename T >
using hb_unwrap_type = _hb_unwrap_type<T, void>

Definition at line 211 of file hb-meta.hh.

◆ hb_void_t

template<typename... Ts>
using hb_void_t = typename _hb_void_t<Ts...>::type

Definition at line 46 of file hb-meta.hh.

Function Documentation

◆ _hb_try_add_lvalue_reference() [1/2]

template<typename T >
auto _hb_try_add_lvalue_reference ( hb_priority< 0 >  ) -> hb_type_identity< T >

◆ _hb_try_add_lvalue_reference() [2/2]

template<typename T >
auto _hb_try_add_lvalue_reference ( hb_priority< 1 >  ) -> hb_type_identity< T & >

◆ _hb_try_add_pointer()

template<typename T >
auto _hb_try_add_pointer ( hb_priority< 1 >  ) -> hb_type_identity< hb_remove_reference< T > * >

◆ _hb_try_add_rvalue_reference() [1/2]

template<typename T >
auto _hb_try_add_rvalue_reference ( hb_priority< 0 >  ) -> hb_type_identity< T >

◆ _hb_try_add_rvalue_reference() [2/2]

template<typename T >
auto _hb_try_add_rvalue_reference ( hb_priority< 1 >  ) -> hb_type_identity< T && >

◆ HB_FUNCOBJ()

struct @140 HB_FUNCOBJ ( hb_deref  )

Variable Documentation

◆ HB_FUNCOBJ

struct hb_reference_wrapper HB_FUNCOBJ