diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 75f244cc..1de7048b 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -35,31 +36,6 @@ namespace boost { namespace fusion struct forward_traversal_tag; struct fusion_sequence_tag; - struct nil_ : sequence_base - { - 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; - - BOOST_FUSION_GPU_ENABLED - nil_() {} - - template - BOOST_FUSION_GPU_ENABLED - nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) - {} - - template - BOOST_FUSION_GPU_ENABLED - void assign_from_iter(Iterator const& /*iter*/) - { - } - }; - template struct cons : sequence_base > { diff --git a/include/boost/fusion/container/list/detail/empty_impl.hpp b/include/boost/fusion/container/list/detail/empty_impl.hpp index b6b43c8b..e25eab0b 100644 --- a/include/boost/fusion/container/list/detail/empty_impl.hpp +++ b/include/boost/fusion/container/list/detail/empty_impl.hpp @@ -9,6 +9,7 @@ #include #include +#include namespace boost { namespace fusion { diff --git a/include/boost/fusion/container/list/nil.hpp b/include/boost/fusion/container/list/nil.hpp new file mode 100644 index 00000000..86373995 --- /dev/null +++ b/include/boost/fusion/container/list/nil.hpp @@ -0,0 +1,50 @@ +/*============================================================================= + Copyright (c) 2014 Eric Niebler + + 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) +==============================================================================*/ +#if !defined(FUSION_NIL_04232014_0843) +#define FUSION_NIL_04232014_0843 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct void_; + struct cons_tag; + struct forward_traversal_tag; + struct fusion_sequence_tag; + + struct nil_ : sequence_base + { + 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; + + BOOST_FUSION_GPU_ENABLED + nil_() {} + + template + BOOST_FUSION_GPU_ENABLED + nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) + {} + + template + BOOST_FUSION_GPU_ENABLED + void assign_from_iter(Iterator const& /*iter*/) + { + } + }; +}} + +#endif + diff --git a/include/boost/fusion/include/nil.hpp b/include/boost/fusion/include/nil.hpp new file mode 100644 index 00000000..3efde4e9 --- /dev/null +++ b/include/boost/fusion/include/nil.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2014 Eric Niebler + + 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) +==============================================================================*/ +#if !defined(FUSION_INCLUDE_NIL) +#define FUSION_INCLUDE_NIL + +#include +#include + +#endif