Files

71 lines
1.8 KiB
C++
Raw Permalink Normal View History

2007-10-21 00:52:09 +00:00
/*=============================================================================
2011-09-16 05:30:23 +00:00
Copyright (c) 2001-2011 Joel de Guzman
2007-10-21 00:52:09 +00:00
Copyright (c) 2005-2006 Dan Marsden
2010-02-22 22:55:54 +00:00
Copyright (c) 2009-2010 Christopher Schmidt
2007-10-21 00:52:09 +00:00
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)
==============================================================================*/
2010-02-25 20:10:37 +00:00
#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
2007-10-21 00:52:09 +00:00
2014-01-09 17:58:06 -08:00
#include <boost/fusion/support/config.hpp>
2010-02-22 22:55:54 +00:00
#include <boost/fusion/iterator/basic_iterator.hpp>
namespace boost { namespace fusion { namespace extension
2007-10-21 00:52:09 +00:00
{
2010-02-22 22:55:54 +00:00
template<typename>
struct begin_impl;
2007-10-21 00:52:09 +00:00
2010-02-22 22:55:54 +00:00
template <>
struct begin_impl<struct_tag>
2007-10-21 00:52:09 +00:00
{
2010-02-22 22:55:54 +00:00
template <typename Seq>
struct apply
2007-10-21 00:52:09 +00:00
{
2010-02-22 22:55:54 +00:00
typedef
basic_iterator<
struct_iterator_tag
, random_access_traversal_tag
, Seq
, 0
>
type;
2007-10-21 00:52:09 +00:00
2015-03-03 02:21:02 +09:00
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
2010-02-22 22:55:54 +00:00
static type
call(Seq& seq)
{
return type(seq,0);
}
2007-10-21 00:52:09 +00:00
};
2010-02-22 22:55:54 +00:00
};
template <>
struct begin_impl<assoc_struct_tag>
{
template <typename Seq>
struct apply
{
typedef
basic_iterator<
2010-02-25 20:10:37 +00:00
struct_iterator_tag
2010-02-22 22:55:54 +00:00
, assoc_struct_category
, Seq
, 0
>
type;
2015-03-03 02:21:02 +09:00
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
2010-02-22 22:55:54 +00:00
static type
call(Seq& seq)
{
return type(seq,0);
}
};
};
}}}
2007-10-21 00:52:09 +00:00
#endif