2007-10-21 00:52:09 +00:00
|
|
|
/*=============================================================================
|
|
|
|
Copyright (c) 2001-2006 Joel de Guzman
|
|
|
|
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-22 22:55:54 +00:00
|
|
|
#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
|
|
|
|
#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2010-02-22 22:55:54 +00:00
|
|
|
#include <boost/fusion/iterator/basic_iterator.hpp>
|
|
|
|
#include <boost/type_traits/remove_const.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 end_impl;
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2010-02-22 22:55:54 +00:00
|
|
|
template <>
|
|
|
|
struct end_impl<struct_tag>
|
2007-10-21 00:52:09 +00:00
|
|
|
{
|
2010-02-22 22:55:54 +00:00
|
|
|
template <typename Seq>
|
|
|
|
struct apply
|
|
|
|
{
|
|
|
|
typedef
|
|
|
|
basic_iterator<
|
|
|
|
struct_iterator_tag
|
|
|
|
, random_access_traversal_tag
|
|
|
|
, Seq
|
|
|
|
, struct_size<typename remove_const<Seq>::type>::value
|
|
|
|
>
|
|
|
|
type;
|
2007-10-21 00:52:09 +00:00
|
|
|
|
2010-02-22 22:55:54 +00:00
|
|
|
static type
|
|
|
|
call(Seq& seq)
|
|
|
|
{
|
|
|
|
return type(seq,0);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
2007-12-19 10:42:04 +00:00
|
|
|
|
2010-02-22 22:55:54 +00:00
|
|
|
template <>
|
|
|
|
struct end_impl<assoc_struct_tag>
|
|
|
|
{
|
|
|
|
template <typename Seq>
|
|
|
|
struct apply
|
2007-10-21 00:52:09 +00:00
|
|
|
{
|
2010-02-22 22:55:54 +00:00
|
|
|
typedef
|
|
|
|
basic_iterator<
|
|
|
|
assoc_struct_iterator_tag
|
|
|
|
, assoc_struct_category
|
|
|
|
, Seq
|
|
|
|
, struct_size<typename remove_const<Seq>::type>::value
|
|
|
|
>
|
|
|
|
type;
|
|
|
|
|
|
|
|
static type
|
|
|
|
call(Seq& seq)
|
2007-10-21 00:52:09 +00:00
|
|
|
{
|
2010-02-22 22:55:54 +00:00
|
|
|
return type(seq,0);
|
|
|
|
}
|
2007-10-21 00:52:09 +00:00
|
|
|
};
|
2010-02-22 22:55:54 +00:00
|
|
|
};
|
|
|
|
}}}
|
2007-10-21 00:52:09 +00:00
|
|
|
|
|
|
|
#endif
|