[meta] Capture rvalue-references in is_reference / remove_reference
This commit is contained in:
parent
7166bd5634
commit
a17f0fa3a1
@ -93,6 +93,7 @@ template <typename T> using hb_remove_const = typename hb_match_const<T>::type;
|
||||
#define hb_is_const(T) hb_match_const<T>::value
|
||||
template <typename T> struct hb_match_reference { typedef T type; enum { value = false }; };
|
||||
template <typename T> struct hb_match_reference<T &> { typedef T type; enum { value = true }; };
|
||||
template <typename T> struct hb_match_reference<T &&> { typedef T type; enum { value = true }; };
|
||||
template <typename T> using hb_remove_reference = typename hb_match_reference<T>::type;
|
||||
#define hb_is_reference(T) hb_match_reference<T>::value
|
||||
template <typename T> struct hb_match_pointer { typedef T type; enum { value = false }; };
|
||||
|
Loading…
Reference in New Issue
Block a user