diff --git a/include/boost/fusion/container/generation/make_set.hpp b/include/boost/fusion/container/generation/make_set.hpp index 7f98532b..cd8519e5 100644 --- a/include/boost/fusion/container/generation/make_set.hpp +++ b/include/boost/fusion/container/generation/make_set.hpp @@ -19,6 +19,9 @@ /////////////////////////////////////////////////////////////////////////////// #include +#include +#include +#include namespace boost { namespace fusion { @@ -27,16 +30,22 @@ namespace boost { namespace fusion template struct make_set { - typedef set::type...> type; + typedef set< + typename detail::as_fusion_element< + typename remove_const< + typename remove_reference::type + >::type + >::type... + > type; }; } template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED inline typename result_of::make_set::type - make_set(T const&... arg) + make_set(T&&... arg) { - return typename result_of::make_set::type(arg...); + return typename result_of::make_set::type(std::forward(arg)...); } }} diff --git a/include/boost/fusion/container/set/set.hpp b/include/boost/fusion/container/set/set.hpp index 0d93290b..8d5cc13b 100644 --- a/include/boost/fusion/container/set/set.hpp +++ b/include/boost/fusion/container/set/set.hpp @@ -95,41 +95,22 @@ namespace boost { namespace fusion set() : data() {} - template - BOOST_FUSION_GPU_ENABLED - set(Sequence const& rhs) - : data(rhs) {} - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_FUSION_GPU_ENABLED set(Sequence&& rhs) : data(std::forward(rhs)) {} -#endif BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit set(typename detail::call_param::type ...args) : data(args...) {} -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit set(U&& ...args) : data(std::forward(args)...) {} -#endif - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - set& - operator=(U const& rhs) - { - data = rhs; - return *this; - } - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED set& @@ -138,7 +119,6 @@ namespace boost { namespace fusion data = std::forward(rhs); return *this; } -#endif BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED storage_type& get_data() { return data; }