allow for pointer types in getters (was done for function pointers)

This commit is contained in:
2024-05-22 16:05:05 +02:00
parent 82cfb6d492
commit f7a519754d
2 changed files with 25 additions and 6 deletions

View File

@@ -21,5 +21,20 @@ namespace internal {
public:
static constexpr const char* version = get_version();
};
// more type support
struct true_type {
const static bool value {true};
};
struct false_type {
const static bool value {false};
};
template<class T> struct is_pointer : false_type {};
template<class T> struct is_pointer<T*> : true_type {};
template<class T> struct is_pointer<T* const> : true_type {};
template<class T> struct is_pointer<T* volatile> : true_type {};
template<class T> struct is_pointer<T* const volatile> : true_type {};
} // internal