From b46aad996ad7f6fcf81109679f277b21556455e3 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Thu, 11 Feb 2016 23:56:07 +0900 Subject: [PATCH] Remove trailing void_ support on variadic vector. --- .../container/generation/make_vector.hpp | 34 ++++--------------- .../boost/fusion/container/vector/vector.hpp | 33 +++++------------- 2 files changed, 15 insertions(+), 52 deletions(-) diff --git a/include/boost/fusion/container/generation/make_vector.hpp b/include/boost/fusion/container/generation/make_vector.hpp index cd3b992b..4e4bcb2d 100644 --- a/include/boost/fusion/container/generation/make_vector.hpp +++ b/include/boost/fusion/container/generation/make_vector.hpp @@ -30,33 +30,13 @@ namespace boost { namespace fusion template struct make_vector { - // make `make_vector' into `make_vector' - template struct trim_void; - - template - struct trim_void > - { - typedef vector type; - }; - - template - struct trim_void, void_, Tail...> - : trim_void > { }; - - template - struct trim_void, Head, Tail...> - : trim_void, Tail...> { }; - - typedef - typename trim_void< - vector<> - , typename detail::as_fusion_element< - typename remove_const< - typename remove_reference::type - >::type - >::type... - >::type - type; + typedef vector< + typename detail::as_fusion_element< + typename remove_const< + typename remove_reference::type + >::type + >::type... + > type; }; } diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 9d0f97bd..6c9c44fe 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -276,37 +276,20 @@ namespace boost { namespace fusion static BOOST_FUSION_GPU_ENABLED mpl::identity value_at_impl(store*); }; - - template - struct trim_void_; - - template - struct trim_void_ > - { - typedef vector_data< - typename detail::make_index_sequence::type - , T... - > type; - }; - - template - struct trim_void_, void_, Tail...> - : trim_void_ > {}; - - template - struct trim_void_, Head, Tail...> - : trim_void_, Tail...> {}; - - template - struct trim_void : trim_void_, T...> {}; } // namespace boost::fusion::vector_detail // This class provides backward compatibility: vector. template struct vector - : vector_detail::trim_void::type + : vector_detail::vector_data< + typename detail::make_index_sequence::type + , T... + > { - typedef typename vector_detail::trim_void::type base; + typedef vector_detail::vector_data< + typename detail::make_index_sequence::type + , T... + > base; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED vector()