summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/fusion/container/list/cons.hpp')
-rw-r--r--3rdParty/Boost/src/boost/fusion/container/list/cons.hpp37
1 files changed, 14 insertions, 23 deletions
diff --git a/3rdParty/Boost/src/boost/fusion/container/list/cons.hpp b/3rdParty/Boost/src/boost/fusion/container/list/cons.hpp
index 666b536..1de7048 100644
--- a/3rdParty/Boost/src/boost/fusion/container/list/cons.hpp
+++ b/3rdParty/Boost/src/boost/fusion/container/list/cons.hpp
@@ -8,12 +8,14 @@
#if !defined(FUSION_CONS_07172005_0843)
#define FUSION_CONS_07172005_0843
+#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/list/cons_fwd.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/container/list/nil.hpp>
#include <boost/fusion/container/list/cons_iterator.hpp>
#include <boost/fusion/container/list/detail/begin_impl.hpp>
#include <boost/fusion/container/list/detail/end_impl.hpp>
@@ -34,29 +36,7 @@ namespace boost { namespace fusion
struct forward_traversal_tag;
struct fusion_sequence_tag;
- struct nil : sequence_base<nil>
- {
- typedef mpl::int_<0> size;
- typedef cons_tag fusion_tag;
- typedef fusion_sequence_tag tag; // this gets picked up by MPL
- typedef mpl::false_ is_view;
- typedef forward_traversal_tag category;
- typedef void_ car_type;
- typedef void_ cdr_type;
-
- nil() {}
-
- template <typename Iterator>
- nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/)
- {}
-
- template <typename Iterator>
- void assign_from_iter(Iterator const& /*iter*/)
- {
- }
- };
-
- template <typename Car, typename Cdr /*= nil*/>
+ template <typename Car, typename Cdr /*= nil_*/>
struct cons : sequence_base<cons<Car, Cdr> >
{
typedef mpl::int_<Cdr::size::value+1> size;
@@ -67,25 +47,31 @@ namespace boost { namespace fusion
typedef Car car_type;
typedef Cdr cdr_type;
+ BOOST_FUSION_GPU_ENABLED
cons()
: car(), cdr() {}
+ BOOST_FUSION_GPU_ENABLED
explicit cons(typename detail::call_param<Car>::type in_car)
: car(in_car), cdr() {}
+ BOOST_FUSION_GPU_ENABLED
cons(
typename detail::call_param<Car>::type in_car
, typename detail::call_param<Cdr>::type in_cdr)
: car(in_car), cdr(in_cdr) {}
template <typename Car2, typename Cdr2>
+ BOOST_FUSION_GPU_ENABLED
cons(cons<Car2, Cdr2> const& rhs)
: car(rhs.car), cdr(rhs.cdr) {}
+ BOOST_FUSION_GPU_ENABLED
cons(cons const& rhs)
: car(rhs.car), cdr(rhs.cdr) {}
template <typename Sequence>
+ BOOST_FUSION_GPU_ENABLED
cons(
Sequence const& seq
, typename boost::disable_if<
@@ -99,11 +85,13 @@ namespace boost { namespace fusion
, cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {}
template <typename Iterator>
+ BOOST_FUSION_GPU_ENABLED
cons(Iterator const& iter, mpl::true_ /*this_is_an_iterator*/)
: car(*iter)
, cdr(fusion::next(iter), mpl::true_()) {}
template <typename Car2, typename Cdr2>
+ BOOST_FUSION_GPU_ENABLED
cons& operator=(cons<Car2, Cdr2> const& rhs)
{
car = rhs.car;
@@ -111,6 +99,7 @@ namespace boost { namespace fusion
return *this;
}
+ BOOST_FUSION_GPU_ENABLED
cons& operator=(cons const& rhs)
{
car = rhs.car;
@@ -119,6 +108,7 @@ namespace boost { namespace fusion
}
template <typename Sequence>
+ BOOST_FUSION_GPU_ENABLED
typename boost::disable_if<is_convertible<Sequence, Car>, cons&>::type
operator=(Sequence const& seq)
{
@@ -129,6 +119,7 @@ namespace boost { namespace fusion
}
template <typename Iterator>
+ BOOST_FUSION_GPU_ENABLED
void assign_from_iter(Iterator const& iter)
{
car = *iter;