From 00c46e0f9ab4f477dc7f00314d99872ff6897a5c Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 1 Aug 2018 17:18:59 +1000 Subject: [PATCH] types/traits: move inner_type to the util namespace --- types/traits.hpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/types/traits.hpp b/types/traits.hpp index 07eb0fdf..e407af52 100644 --- a/types/traits.hpp +++ b/types/traits.hpp @@ -349,28 +349,30 @@ template constexpr auto is_contiguous_v = is_contiguous::value; -/////////////////////////////////////////////////////////////////////////////// -/// stores the type of '::value_type' for a given type, or the type itself if -/// it does not have such a type. -template > -struct inner_type { - using type = ValueT; -}; +namespace util { + /////////////////////////////////////////////////////////////////////////////// + /// stores the type of '::value_type' for a given type, or the type itself if + /// it does not have such a type. + template > + struct inner_type { + using type = ValueT; + }; -//----------------------------------------------------------------------------- -template -struct inner_type< - ValueT, - std::void_t -> { - using type = typename ValueT::value_type; -}; + //----------------------------------------------------------------------------- + template + struct inner_type< + ValueT, + std::void_t + > { + using type = typename ValueT::value_type; + }; -//----------------------------------------------------------------------------- -template -using inner_type_t = typename inner_type::type; + //----------------------------------------------------------------------------- + template + using inner_type_t = typename inner_type::type; +} ///////////////////////////////////////////////////////////////////////////////