diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:33:54 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:36:09 +0900 |
commit | d9ec475d945d3035377a0d89ed42e382d8988891 (patch) | |
tree | 34aff2cee4b209906243ab5499d61f3edee2982f /boost/fusion/container/generation/make_set.hpp | |
parent | 71d216b90256936a9638f325af9bc69d720e75de (diff) | |
download | boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2 boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip |
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/fusion/container/generation/make_set.hpp')
-rw-r--r-- | boost/fusion/container/generation/make_set.hpp | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/boost/fusion/container/generation/make_set.hpp b/boost/fusion/container/generation/make_set.hpp index 705ec582a8..cd8519e54d 100644 --- a/boost/fusion/container/generation/make_set.hpp +++ b/boost/fusion/container/generation/make_set.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2014 Kohei Takahashi + Copyright (c) 2014-2015 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,7 +10,46 @@ #include <boost/fusion/support/config.hpp> #include <boost/fusion/container/set/set.hpp> +#if !defined(BOOST_FUSION_HAS_VARIADIC_SET) # include <boost/fusion/container/generation/detail/pp_make_set.hpp> +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// + +#include <boost/fusion/support/detail/as_fusion_element.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <utility> + +namespace boost { namespace fusion +{ + namespace result_of + { + template <typename ...T> + struct make_set + { + typedef set< + typename detail::as_fusion_element< + typename remove_const< + typename remove_reference<T>::type + >::type + >::type... + > type; + }; + } + + template <typename ...T> + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + inline typename result_of::make_set<T...>::type + make_set(T&&... arg) + { + return typename result_of::make_set<T...>::type(std::forward<T>(arg)...); + } + }} + + +#endif #endif |