is_pointer traits

This commit is contained in:
Baptiste Wicht 2016-09-27 15:25:38 +02:00
parent 0d567e5332
commit 13da670496
No known key found for this signature in database
GPG Key ID: C5566B6C7F884532

View File

@ -158,6 +158,24 @@ struct has_trivial_assign {
static constexpr const bool value = __has_trivial_assign(T);
};
/* is_pointer */
/*!
* \brief Traits to test if given type is a pointer type
*/
template <typename T>
struct is_pointer {
static constexpr const bool value = false;
};
/*!
* \copdoc is_pointer
*/
template <typename T>
struct is_pointer<T*>{
static constexpr const bool value = true;
};
/* is_reference */
template <typename T>