forked from boostorg/fusion
The ctor should check which is seqence or not.
This commit is contained in:
@ -25,8 +25,11 @@
|
|||||||
#include <boost/type_traits/is_convertible.hpp>
|
#include <boost/type_traits/is_convertible.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/mpl/int.hpp>
|
#include <boost/mpl/int.hpp>
|
||||||
#include <boost/mpl/bool.hpp>
|
#include <boost/mpl/bool.hpp>
|
||||||
|
#include <boost/mpl/and.hpp>
|
||||||
|
#include <boost/mpl/not.hpp>
|
||||||
|
|
||||||
namespace boost { namespace fusion
|
namespace boost { namespace fusion
|
||||||
{
|
{
|
||||||
@ -73,8 +76,10 @@ namespace boost { namespace fusion
|
|||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
cons(
|
cons(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
, typename boost::disable_if<
|
, typename boost::enable_if<
|
||||||
is_convertible<Sequence, Car> // use copy to car instead
|
mpl::and_<
|
||||||
|
traits::is_sequence<Sequence>
|
||||||
|
, mpl::not_<is_convertible<Sequence, Car> > > // use copy to car instead
|
||||||
>::type* /*dummy*/ = 0
|
>::type* /*dummy*/ = 0
|
||||||
)
|
)
|
||||||
: car(*fusion::begin(seq))
|
: car(*fusion::begin(seq))
|
||||||
@ -105,7 +110,11 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
typename boost::disable_if<is_convertible<Sequence, Car>, cons&>::type
|
typename boost::enable_if<
|
||||||
|
mpl::and_<
|
||||||
|
traits::is_sequence<Sequence>
|
||||||
|
, mpl::not_<is_convertible<Sequence, Car> > >
|
||||||
|
, cons&>::type
|
||||||
operator=(Sequence const& seq)
|
operator=(Sequence const& seq)
|
||||||
{
|
{
|
||||||
typedef typename result_of::begin<Sequence const>::type Iterator;
|
typedef typename result_of::begin<Sequence const>::type Iterator;
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/list/list_fwd.hpp>
|
#include <boost/fusion/container/list/list_fwd.hpp>
|
||||||
#include <boost/fusion/container/list/detail/list_to_cons.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)
|
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||||
#include <boost/fusion/container/list/detail/preprocessed/list.hpp>
|
#include <boost/fusion/container/list/detail/preprocessed/list.hpp>
|
||||||
@ -59,7 +61,8 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
list(Sequence const& rhs)
|
list(Sequence const& rhs
|
||||||
|
, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0)
|
||||||
: inherited_type(rhs) {}
|
: inherited_type(rhs) {}
|
||||||
|
|
||||||
// Expand a couple of forwarding constructors for arguments
|
// Expand a couple of forwarding constructors for arguments
|
||||||
@ -80,10 +83,10 @@ namespace boost { namespace fusion
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename Sequence>
|
||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
list&
|
typename boost::enable_if<traits::is_sequence<Sequence>, list&>::type
|
||||||
operator=(T const& rhs)
|
operator=(Sequence const& rhs)
|
||||||
{
|
{
|
||||||
inherited_type::operator=(rhs);
|
inherited_type::operator=(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#define FUSION_SET_09162005_1104
|
#define FUSION_SET_09162005_1104
|
||||||
|
|
||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include <boost/fusion/container/vector/vector.hpp>
|
#include <boost/fusion/container/vector/vector.hpp>
|
||||||
#include <boost/mpl/identity.hpp>
|
#include <boost/mpl/identity.hpp>
|
||||||
#include <boost/mpl/bool.hpp>
|
#include <boost/mpl/bool.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||||
#include <boost/fusion/container/set/detail/preprocessed/set.hpp>
|
#include <boost/fusion/container/set/detail/preprocessed/set.hpp>
|
||||||
@ -69,7 +71,8 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
set(Sequence const& rhs)
|
set(Sequence const& rhs
|
||||||
|
, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0)
|
||||||
: data(rhs) {}
|
: data(rhs) {}
|
||||||
|
|
||||||
#include <boost/fusion/container/set/detail/set_forward_ctor.hpp>
|
#include <boost/fusion/container/set/detail/set_forward_ctor.hpp>
|
||||||
|
@ -208,6 +208,7 @@ FUSION_HASH endif
|
|||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
BOOST_PP_CAT(vector, N)(
|
BOOST_PP_CAT(vector, N)(
|
||||||
Sequence const& seq
|
Sequence const& seq
|
||||||
|
, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0
|
||||||
#if (N == 1)
|
#if (N == 1)
|
||||||
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
||||||
#endif
|
#endif
|
||||||
@ -218,6 +219,7 @@ FUSION_HASH endif
|
|||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
BOOST_PP_CAT(vector, N)(
|
BOOST_PP_CAT(vector, N)(
|
||||||
Sequence& seq
|
Sequence& seq
|
||||||
|
, typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0
|
||||||
#if (N == 1)
|
#if (N == 1)
|
||||||
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
, typename boost::disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/container/vector/vector_fwd.hpp>
|
#include <boost/fusion/container/vector/vector_fwd.hpp>
|
||||||
#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
|
#include <boost/fusion/container/vector/detail/vector_n_chooser.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||||
@ -20,6 +21,7 @@
|
|||||||
#include <boost/type_traits/add_const.hpp>
|
#include <boost/type_traits/add_const.hpp>
|
||||||
#include <boost/type_traits/is_base_of.hpp>
|
#include <boost/type_traits/is_base_of.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#define FUSION_HASH #
|
#define FUSION_HASH #
|
||||||
|
|
||||||
@ -115,7 +117,8 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Sequence>
|
template <typename Sequence>
|
||||||
BOOST_FUSION_GPU_ENABLED
|
BOOST_FUSION_GPU_ENABLED
|
||||||
vector(Sequence const& rhs)
|
vector(Sequence const& rhs,
|
||||||
|
typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0)
|
||||||
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
: vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
|
||||||
|
|
||||||
// Expand a couple of forwarding constructors for arguments
|
// Expand a couple of forwarding constructors for arguments
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/vector/vector10_fwd.hpp>
|
#include <boost/fusion/container/vector/vector10_fwd.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/iterator/next.hpp>
|
#include <boost/fusion/iterator/next.hpp>
|
||||||
#include <boost/fusion/iterator/deref.hpp>
|
#include <boost/fusion/iterator/deref.hpp>
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/vector/vector20_fwd.hpp>
|
#include <boost/fusion/container/vector/vector20_fwd.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/iterator/next.hpp>
|
#include <boost/fusion/iterator/next.hpp>
|
||||||
#include <boost/fusion/iterator/deref.hpp>
|
#include <boost/fusion/iterator/deref.hpp>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/vector/vector30_fwd.hpp>
|
#include <boost/fusion/container/vector/vector30_fwd.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/iterator/next.hpp>
|
#include <boost/fusion/iterator/next.hpp>
|
||||||
#include <boost/fusion/iterator/deref.hpp>
|
#include <boost/fusion/iterator/deref.hpp>
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/vector/vector40_fwd.hpp>
|
#include <boost/fusion/container/vector/vector40_fwd.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/iterator/next.hpp>
|
#include <boost/fusion/iterator/next.hpp>
|
||||||
#include <boost/fusion/iterator/deref.hpp>
|
#include <boost/fusion/iterator/deref.hpp>
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <boost/fusion/support/config.hpp>
|
#include <boost/fusion/support/config.hpp>
|
||||||
#include <boost/fusion/container/vector/vector50_fwd.hpp>
|
#include <boost/fusion/container/vector/vector50_fwd.hpp>
|
||||||
#include <boost/fusion/support/sequence_base.hpp>
|
#include <boost/fusion/support/sequence_base.hpp>
|
||||||
|
#include <boost/fusion/support/is_sequence.hpp>
|
||||||
#include <boost/fusion/support/detail/access.hpp>
|
#include <boost/fusion/support/detail/access.hpp>
|
||||||
#include <boost/fusion/iterator/next.hpp>
|
#include <boost/fusion/iterator/next.hpp>
|
||||||
#include <boost/fusion/iterator/deref.hpp>
|
#include <boost/fusion/iterator/deref.hpp>
|
||||||
|
Reference in New Issue
Block a user