Added remove_cv, remove_const and remove_volatile
This commit is contained in:
parent
b5ecd73b18
commit
91398ef23d
@ -38,22 +38,25 @@ using size_t = uint16_t;
|
||||
|
||||
// clang-format off
|
||||
|
||||
template<typename T>
|
||||
struct remove_reference {
|
||||
using type = T;
|
||||
};
|
||||
template<typename T>
|
||||
struct remove_reference<T &> {
|
||||
using type = T;
|
||||
};
|
||||
template<typename T>
|
||||
struct remove_reference<T &&> {
|
||||
using type = T;
|
||||
};
|
||||
template <typename T> struct remove_reference { using type = T; };
|
||||
template <typename T> struct remove_reference<T &> {using type = T; };
|
||||
template <typename T> struct remove_reference<T &&> { using type = T; };
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
using remove_reference_t = typename std::remove_reference<T>::type;
|
||||
|
||||
|
||||
template <class T> struct remove_cv { typedef T type; };
|
||||
template <class T> struct remove_cv<const T> { typedef T type; };
|
||||
template <class T> struct remove_cv<volatile T> { typedef T type; };
|
||||
template <class T> struct remove_cv<const volatile T> { typedef T type; };
|
||||
|
||||
template <class T> struct remove_const { typedef T type; };
|
||||
template <class T> struct remove_const<const T> { typedef T type; };
|
||||
|
||||
template <class T> struct remove_volatile { typedef T type; };
|
||||
template <class T> struct remove_volatile<volatile T> { typedef T type; };
|
||||
|
||||
// clang-format on
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user