From 13da670496b55aa310dbd5b04b2e1b502cad06fe Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Tue, 27 Sep 2016 15:25:38 +0200 Subject: [PATCH] is_pointer traits --- tstl/include/type_traits.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tstl/include/type_traits.hpp b/tstl/include/type_traits.hpp index 026aabe5..8d67e8d9 100644 --- a/tstl/include/type_traits.hpp +++ b/tstl/include/type_traits.hpp @@ -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 +struct is_pointer { + static constexpr const bool value = false; +}; + +/*! + * \copdoc is_pointer + */ +template +struct is_pointer{ + static constexpr const bool value = true; +}; + /* is_reference */ template