forked from boostorg/fusion
put struct nil_ in its own header to fix incomplete type error with nvcc
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#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>
|
||||
@ -35,31 +36,6 @@ 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;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
nil_() {}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/)
|
||||
{}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void assign_from_iter(Iterator const& /*iter*/)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Car, typename Cdr /*= nil_*/>
|
||||
struct cons : sequence_base<cons<Car, Cdr> >
|
||||
{
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/fusion/container/list/nil.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
|
50
include/boost/fusion/container/list/nil.hpp
Normal file
50
include/boost/fusion/container/list/nil.hpp
Normal file
@ -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 <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/list/cons_fwd.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct cons_tag;
|
||||
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;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
nil_() {}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/)
|
||||
{}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
void assign_from_iter(Iterator const& /*iter*/)
|
||||
{
|
||||
}
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
13
include/boost/fusion/include/nil.hpp
Normal file
13
include/boost/fusion/include/nil.hpp
Normal file
@ -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 <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/list/nil.hpp>
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user