From 6f1fbedd88f6da3418e10651ac3802181fad577b Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Mon, 12 Jan 2015 00:38:36 +0900 Subject: [PATCH] fix tuple_construct_traits implementation --- sprout/tuple/traits.hpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sprout/tuple/traits.hpp b/sprout/tuple/traits.hpp index 36bbe050..17be7030 100644 --- a/sprout/tuple/traits.hpp +++ b/sprout/tuple/traits.hpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace sprout { namespace tuples { @@ -47,10 +48,22 @@ namespace sprout { {}; template - SPROUT_CONSTEXPR typename sprout::tuples::tuple_construct_traits::copied_type + inline SPROUT_CONSTEXPR typename std::enable_if< + sprout::detail::is_array_like::value, + typename sprout::tuples::tuple_construct_traits::copied_type + >::type default_make_tuple(Args&&... args) { typedef typename sprout::tuples::tuple_construct_traits::copied_type copied_type; - return copied_type{SPROUT_FORWARD(Args, args)...}; + return copied_type{{SPROUT_FORWARD(Args, args)...}}; + } + template + inline SPROUT_CONSTEXPR typename std::enable_if< + !sprout::detail::is_array_like::value, + typename sprout::tuples::tuple_construct_traits::copied_type + >::type + default_make_tuple(Args&&... args) { + typedef typename sprout::tuples::tuple_construct_traits::copied_type copied_type; + return copied_type(SPROUT_FORWARD(Args, args)...); } } // namespace detail