summaryrefslogtreecommitdiff
path: root/boost/fusion/container/list/list.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/fusion/container/list/list.hpp')
-rw-r--r--boost/fusion/container/list/list.hpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/boost/fusion/container/list/list.hpp b/boost/fusion/container/list/list.hpp
index 9e042bb481..5b584131cc 100644
--- a/boost/fusion/container/list/list.hpp
+++ b/boost/fusion/container/list/list.hpp
@@ -10,6 +10,8 @@
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/list/list_fwd.hpp>
#include <boost/fusion/container/list/detail/list_to_cons.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/core/enable_if.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/list/detail/preprocessed/list.hpp>
@@ -48,31 +50,32 @@ namespace boost { namespace fusion
public:
typedef typename list_to_cons::type inherited_type;
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
list()
: inherited_type() {}
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
: inherited_type(rhs) {}
template <typename Sequence>
- BOOST_FUSION_GPU_ENABLED
- list(Sequence const& rhs)
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ list(Sequence const& rhs
+ , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0)
: inherited_type(rhs) {}
// Expand a couple of forwarding constructors for arguments
// of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
//
// list(
- // typename detail::call_param<T0>::type _0
- // , typename detail::call_param<T1>::type _1)
- // : inherited_type(list_to_cons::call(_0, _1)) {}
+ // typename detail::call_param<T0>::type arg0
+ // , typename detail::call_param<T1>::type arg1)
+ // : inherited_type(list_to_cons::call(arg0, arg1)) {}
#include <boost/fusion/container/list/detail/list_forward_ctor.hpp>
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
- BOOST_FUSION_GPU_ENABLED
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
list&
operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
{
@@ -80,10 +83,10 @@ namespace boost { namespace fusion
return *this;
}
- template <typename T>
- BOOST_FUSION_GPU_ENABLED
- list&
- operator=(T const& rhs)
+ template <typename Sequence>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ typename boost::enable_if<traits::is_sequence<Sequence>, list&>::type
+ operator=(Sequence const& rhs)
{
inherited_type::operator=(rhs);
return *this;