forked from boostorg/fusion
Fusion: merge from trunk
[SVN r65735]
This commit is contained in:
@ -8,10 +8,10 @@
|
||||
#if !defined(BOOST_FUSION_ADAPTED_30122005_1420)
|
||||
#define BOOST_FUSION_ADAPTED_30122005_1420
|
||||
|
||||
#include <boost/fusion/adapted/adt.hpp>
|
||||
#include <boost/fusion/adapted/array.hpp>
|
||||
#include <boost/fusion/adapted/boost_array.hpp>
|
||||
#include <boost/fusion/adapted/boost_tuple.hpp>
|
||||
#include <boost/fusion/adapted/class.hpp>
|
||||
#include <boost/fusion/adapted/mpl.hpp>
|
||||
#include <boost/fusion/adapted/std_pair.hpp>
|
||||
#include <boost/fusion/adapted/struct.hpp>
|
||||
|
@ -7,12 +7,12 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_HPP
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_assoc_class_named.hpp>
|
||||
#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
|
||||
#include <boost/fusion/adapted/class/adapt_class_named.hpp>
|
||||
#include <boost/fusion/adapted/class/adapt_class.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt.hpp>
|
||||
|
||||
#endif
|
@ -7,8 +7,8 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_HPP
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/empty.hpp>
|
||||
@ -29,46 +29,46 @@
|
||||
#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/adapted/class/detail/extension.hpp>
|
||||
#include <boost/fusion/adapted/class/detail/adapt_base.hpp>
|
||||
#include <boost/fusion/adapted/adt/detail/extension.hpp>
|
||||
#include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_FILLER_0(A, B, C, D)\
|
||||
((A, B, C, D)) BOOST_FUSION_ADAPT_CLASS_FILLER_1
|
||||
#define BOOST_FUSION_ADAPT_CLASS_FILLER_1(A, B, C, D)\
|
||||
((A, B, C, D)) BOOST_FUSION_ADAPT_CLASS_FILLER_0
|
||||
#define BOOST_FUSION_ADAPT_CLASS_FILLER_0_END
|
||||
#define BOOST_FUSION_ADAPT_CLASS_FILLER_1_END
|
||||
#define BOOST_FUSION_ADAPT_ADT_FILLER_0(A, B, C, D)\
|
||||
((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_1
|
||||
#define BOOST_FUSION_ADAPT_ADT_FILLER_1(A, B, C, D)\
|
||||
((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_0
|
||||
#define BOOST_FUSION_ADAPT_ADT_FILLER_0_END
|
||||
#define BOOST_FUSION_ADAPT_ADT_FILLER_1_END
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \
|
||||
BOOST_FUSION_ADAPT_CLASS_C_BASE( \
|
||||
#define BOOST_FUSION_ADAPT_ADT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \
|
||||
BOOST_FUSION_ADAPT_ADT_C_BASE( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE, 4)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_TPL_CLASS(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES)\
|
||||
#define BOOST_FUSION_ADAPT_TPL_ADT(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
(1)TEMPLATE_PARAMS_SEQ, \
|
||||
(1)NAME_SEQ, \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS(NAME, ATTRIBUTES) \
|
||||
#define BOOST_FUSION_ADAPT_ADT(NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
(0), \
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
#define BOOST_FUSION_ADAPT_ADT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
(0), \
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
|
||||
#endif
|
@ -7,24 +7,24 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_NAMED_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_NAMED_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_NAMED_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_NAMED_HPP
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_class.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_NAMED_NS( \
|
||||
#define BOOST_FUSION_ADAPT_ADT_NAMED_NS( \
|
||||
WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \
|
||||
WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_CLASS_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_ADT_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
|
||||
ATTRIBUTES)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_CLASS_NAMED_NS( \
|
||||
#define BOOST_FUSION_ADAPT_ADT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_ADT_NAMED_NS( \
|
||||
WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
|
||||
|
||||
#endif
|
@ -7,8 +7,8 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_HPP
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/empty.hpp>
|
||||
@ -32,20 +32,20 @@
|
||||
#include <boost/fusion/adapted/struct/detail/deref_data_impl.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/key_of_impl.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
|
||||
#include <boost/fusion/adapted/class/detail/extension.hpp>
|
||||
#include <boost/fusion/adapted/class/detail/adapt_base.hpp>
|
||||
#include <boost/fusion/adapted/adt/detail/extension.hpp>
|
||||
#include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0(A, B, C, D, E)\
|
||||
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1(A, B, C, D, E)\
|
||||
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0_END
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1_END
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(A, B, C, D, E)\
|
||||
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(A, B, C, D, E)\
|
||||
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0_END
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1_END
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_C( \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_C( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_CLASS_C_BASE(TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,5) \
|
||||
BOOST_FUSION_ADAPT_ADT_C_BASE(TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,5) \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
@ -55,7 +55,7 @@
|
||||
typedef BOOST_PP_TUPLE_ELEM(5, 4, ATTRIBUTE) type; \
|
||||
};
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_TPL_CLASS( \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
@ -63,25 +63,25 @@
|
||||
(1)NAME_SEQ, \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS(NAME, ATTRIBUTES) \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT(NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
(0), \
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE( \
|
||||
(0), \
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#endif
|
@ -5,24 +5,24 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_NAMED_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_NAMED_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_NAMED_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_NAMED_HPP
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
|
||||
#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED_NS( \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED_NS( \
|
||||
WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \
|
||||
WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_ASSOC_CLASS_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
|
||||
ATTRIBUTES)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED_NS( \
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED_NS( \
|
||||
WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
|
||||
|
||||
#endif
|
181
include/boost/fusion/adapted/adt/detail/adapt_base.hpp
Normal file
181
include/boost/fusion/adapted/adt/detail/adapt_base.hpp
Normal file
@ -0,0 +1,181 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2009 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP
|
||||
|
||||
#include <boost/preprocessor/control/if.hpp>
|
||||
#include <boost/preprocessor/seq/seq.hpp>
|
||||
#include <boost/preprocessor/seq/elem.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ) \
|
||||
typename detail::get_identity< \
|
||||
lvalue \
|
||||
, BOOST_PP_SEQ_ELEM(1,TEMPLATE_PARAMS_SEQ) \
|
||||
>::type
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
\
|
||||
remove_const<remove_reference<T>::type>::type
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ADT_C_BASE( \
|
||||
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct access::adt_attribute_access< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
> \
|
||||
{ \
|
||||
template<class Arg> \
|
||||
static void \
|
||||
boost_fusion_adapt_adt_impl_set( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj, \
|
||||
Arg const& val) \
|
||||
{ \
|
||||
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \
|
||||
} \
|
||||
\
|
||||
static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
|
||||
boost_fusion_adapt_adt_impl_get( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \
|
||||
{ \
|
||||
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
|
||||
} \
|
||||
\
|
||||
static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
|
||||
boost_fusion_adapt_adt_impl_get( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \
|
||||
{ \
|
||||
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
|
||||
} \
|
||||
}; \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct adt_attribute_proxy< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
, true \
|
||||
> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) type; \
|
||||
\
|
||||
explicit \
|
||||
adt_attribute_proxy( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const*const o) \
|
||||
: obj(o) \
|
||||
{} \
|
||||
\
|
||||
type get() const \
|
||||
{ \
|
||||
return access::adt_attribute_access< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
>::boost_fusion_adapt_adt_impl_get(*obj); \
|
||||
} \
|
||||
\
|
||||
operator type() const \
|
||||
{ \
|
||||
return get(); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const* obj; \
|
||||
}; \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct adt_attribute_proxy< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
, false \
|
||||
> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \
|
||||
\
|
||||
explicit \
|
||||
adt_attribute_proxy( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)*const o) \
|
||||
: obj(o) \
|
||||
{} \
|
||||
\
|
||||
template<class Arg> \
|
||||
adt_attribute_proxy& \
|
||||
operator=(Arg const& val) \
|
||||
{ \
|
||||
access::adt_attribute_access< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
>::boost_fusion_adapt_adt_impl_set(*obj, val); \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
type get() const \
|
||||
{ \
|
||||
return access::adt_attribute_access< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
>::boost_fusion_adapt_adt_impl_get(*obj); \
|
||||
} \
|
||||
\
|
||||
operator type() const \
|
||||
{ \
|
||||
return get(); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)* obj; \
|
||||
}; \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct access::struct_member< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
|
||||
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
\
|
||||
typedef \
|
||||
BOOST_PP_IF( \
|
||||
BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), \
|
||||
BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL, \
|
||||
BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL)( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
type; \
|
||||
\
|
||||
template<typename Seq> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef \
|
||||
adt_attribute_proxy< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
, is_const<Seq>::value \
|
||||
> \
|
||||
type; \
|
||||
\
|
||||
static type \
|
||||
call(Seq& obj) \
|
||||
{ \
|
||||
return type(&obj); \
|
||||
} \
|
||||
}; \
|
||||
};
|
||||
|
||||
#endif
|
@ -7,27 +7,18 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
|
||||
#ifndef BOOST_FUSION_ADAPTED_ADT_DETAIL_EXTENSION_HPP
|
||||
#define BOOST_FUSION_ADAPTED_ADT_DETAIL_EXTENSION_HPP
|
||||
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, typename Dummy>
|
||||
struct get_identity
|
||||
: remove_const<typename remove_reference<T>::type>
|
||||
{};
|
||||
}
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename T, int N>
|
||||
struct class_member_proxy;
|
||||
}
|
||||
}}
|
||||
template <typename T, typename Dummy>
|
||||
struct get_identity
|
||||
: remove_const<typename remove_reference<T>::type>
|
||||
{};
|
||||
}}}
|
||||
|
||||
#endif
|
@ -1,118 +0,0 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2009 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
|
||||
#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
|
||||
|
||||
#include <boost/preprocessor/control/if.hpp>
|
||||
#include <boost/preprocessor/seq/seq.hpp>
|
||||
#include <boost/preprocessor/seq/elem.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
|
||||
//cschmidt: Spirit relies on Fusion defining class_member_proxy in the
|
||||
//boost::fusion::extension namespace, with two nested types named lvalue and
|
||||
//rvalue.
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ)\
|
||||
typename detail::get_identity< \
|
||||
lvalue \
|
||||
, BOOST_PP_SEQ_ELEM(1,TEMPLATE_PARAMS_SEQ) \
|
||||
>::type
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
\
|
||||
lvalue
|
||||
|
||||
#define BOOST_FUSION_ADAPT_CLASS_C_BASE(\
|
||||
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct class_member_proxy< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) rvalue; \
|
||||
\
|
||||
class_member_proxy(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& o) \
|
||||
: obj(o) \
|
||||
{} \
|
||||
\
|
||||
template<class Arg> \
|
||||
class_member_proxy& \
|
||||
operator=(Arg const& val) \
|
||||
{ \
|
||||
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
operator lvalue() \
|
||||
{ \
|
||||
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
|
||||
} \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
|
||||
\
|
||||
private: \
|
||||
class_member_proxy& operator= (class_member_proxy const&); \
|
||||
}; \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
|
||||
\
|
||||
typedef \
|
||||
BOOST_PP_IF( \
|
||||
BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), \
|
||||
BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL, \
|
||||
BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL)( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
type; \
|
||||
\
|
||||
template<typename Seq> \
|
||||
struct apply \
|
||||
{ \
|
||||
typedef \
|
||||
class_member_proxy< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
> \
|
||||
proxy; \
|
||||
\
|
||||
typedef typename \
|
||||
mpl::if_< \
|
||||
is_const<Seq> \
|
||||
, BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
|
||||
, proxy \
|
||||
>::type \
|
||||
type; \
|
||||
\
|
||||
static proxy \
|
||||
call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \
|
||||
{ \
|
||||
return proxy(obj); \
|
||||
} \
|
||||
\
|
||||
static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
|
||||
call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \
|
||||
{ \
|
||||
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
|
||||
} \
|
||||
}; \
|
||||
};
|
||||
|
||||
#endif
|
@ -87,15 +87,41 @@
|
||||
I, \
|
||||
ATTRIBUTE)
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \
|
||||
typedef ELEM ELEM;
|
||||
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \
|
||||
BOOST_PP_SEQ_FOR_EACH( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM, \
|
||||
_, \
|
||||
BOOST_PP_SEQ_TAIL(SEQ))
|
||||
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) \
|
||||
BOOST_PP_IF( \
|
||||
BOOST_PP_SEQ_HEAD(SEQ), \
|
||||
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL, \
|
||||
BOOST_PP_TUPLE_EAT(1))(SEQ)
|
||||
#else
|
||||
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ)
|
||||
#endif
|
||||
|
||||
#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
|
||||
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
|
||||
struct access::struct_member< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
|
||||
, I \
|
||||
> \
|
||||
{ \
|
||||
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \
|
||||
typedef \
|
||||
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
|
||||
attribute_type; \
|
||||
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
\
|
||||
typedef attribute_type type; \
|
||||
\
|
||||
template<typename Seq> \
|
||||
struct apply \
|
||||
@ -104,12 +130,8 @@
|
||||
add_reference< \
|
||||
typename mpl::eval_if< \
|
||||
is_const<Seq> \
|
||||
, add_const<BOOST_PP_TUPLE_ELEM( \
|
||||
ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
|
||||
> \
|
||||
, mpl::identity<BOOST_PP_TUPLE_ELEM( \
|
||||
ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
|
||||
> \
|
||||
, add_const<attribute_type> \
|
||||
, mpl::identity<attribute_type> \
|
||||
>::type \
|
||||
>::type \
|
||||
type; \
|
||||
|
@ -22,7 +22,7 @@ namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename Seq, typename N>
|
||||
struct apply
|
||||
: extension::struct_member<
|
||||
: access::struct_member<
|
||||
typename remove_const<Seq>::type
|
||||
, N::value
|
||||
>::template apply<Seq>
|
||||
|
@ -20,7 +20,7 @@ namespace boost { namespace fusion { namespace extension
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
extension::struct_member<
|
||||
access::struct_member<
|
||||
typename remove_const<typename It::seq_type>::type
|
||||
, It::index::value
|
||||
>::template apply<typename It::seq_type>
|
||||
|
@ -27,8 +27,17 @@ namespace boost { namespace fusion
|
||||
{
|
||||
struct no_such_member;
|
||||
|
||||
template<typename Seq, int N>
|
||||
struct struct_member;
|
||||
struct access
|
||||
{
|
||||
template<typename Seq, int N>
|
||||
struct struct_member;
|
||||
|
||||
template<typename Seq, int N>
|
||||
struct adt_attribute_access;
|
||||
};
|
||||
|
||||
template <typename T, int N, bool Const>
|
||||
struct adt_attribute_proxy;
|
||||
|
||||
template<typename Seq, int N>
|
||||
struct struct_member_name;
|
||||
|
@ -20,7 +20,7 @@ namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename Seq, typename N>
|
||||
struct apply
|
||||
: struct_member<typename remove_const<Seq>::type, N::value>
|
||||
: access::struct_member<typename remove_const<Seq>::type, N::value>
|
||||
{};
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace boost { namespace fusion { namespace extension
|
||||
{
|
||||
template <typename It>
|
||||
struct apply
|
||||
: extension::struct_member<
|
||||
: access::struct_member<
|
||||
typename remove_const<typename It::seq_type>::type
|
||||
, It::index::value
|
||||
>
|
||||
|
@ -68,7 +68,7 @@ namespace boost { namespace fusion
|
||||
namespace detail
|
||||
{
|
||||
template<typename State, typename It, typename F>
|
||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)
|
||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)
|
||||
: boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename add_const<State>::type>::type,
|
||||
@ -102,24 +102,20 @@ namespace boost { namespace fusion
|
||||
It3;
|
||||
It3 it3 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2);
|
||||
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));
|
||||
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State2,It2,F>::type State3;
|
||||
State3 const state3=f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
|
||||
|
||||
return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||
Result
|
||||
, N-4
|
||||
>::call(
|
||||
f(
|
||||
f(
|
||||
f(
|
||||
f(
|
||||
state,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
||||
it0)
|
||||
),
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)
|
||||
),
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2)
|
||||
),
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)
|
||||
),
|
||||
f(state3,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)),
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3),
|
||||
f);
|
||||
}
|
||||
@ -145,17 +141,13 @@ namespace boost { namespace fusion
|
||||
It2;
|
||||
It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1);
|
||||
|
||||
return f(
|
||||
f(
|
||||
f(
|
||||
state,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)
|
||||
),
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)
|
||||
),
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1)
|
||||
));
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));
|
||||
|
||||
return f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
|
||||
}
|
||||
};
|
||||
|
||||
@ -166,9 +158,11 @@ namespace boost { namespace fusion
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||
|
||||
return f(
|
||||
f(state,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)),
|
||||
state1,
|
||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0)));
|
||||
}
|
||||
@ -201,7 +195,7 @@ namespace boost { namespace fusion
|
||||
struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)
|
||||
{
|
||||
typedef typename
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
@ -213,7 +207,7 @@ namespace boost { namespace fusion
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
@ -223,7 +217,7 @@ namespace boost { namespace fusion
|
||||
result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it1>::type
|
||||
it2;
|
||||
typedef typename
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
rest2
|
||||
, it2
|
||||
, F
|
||||
@ -236,7 +230,7 @@ namespace boost { namespace fusion
|
||||
typedef typename
|
||||
BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||
typename BOOST_PP_CAT(
|
||||
BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
rest3
|
||||
, it3
|
||||
, F
|
||||
@ -259,7 +253,7 @@ namespace boost { namespace fusion
|
||||
>
|
||||
{
|
||||
typedef typename
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
@ -272,9 +266,9 @@ namespace boost { namespace fusion
|
||||
it1;
|
||||
|
||||
typedef typename
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
typename BOOST_PP_CAT(
|
||||
BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
@ -294,8 +288,8 @@ namespace boost { namespace fusion
|
||||
, F
|
||||
, 2
|
||||
>
|
||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
@ -314,7 +308,7 @@ namespace boost { namespace fusion
|
||||
, F
|
||||
, 1
|
||||
>
|
||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
@ -405,7 +399,11 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<Seq,State const,F>::type
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq,State const& state,F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq,State const,F>::call(
|
||||
@ -415,7 +413,11 @@ namespace boost { namespace fusion
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<Seq const,State const,F>::type
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq,State const& state,F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State const,F>::call(
|
||||
|
@ -5,9 +5,9 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_CLASS_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_HPP
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_ADT_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_ADT_HPP
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_class.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt.hpp>
|
||||
|
||||
#endif
|
@ -4,9 +4,9 @@
|
||||
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_ADAPT_CLASS_NAMED)
|
||||
#define FUSION_INCLUDE_ADAPT_CLASS_NAMED
|
||||
#if !defined(FUSION_INCLUDE_ADAPT_ADT_NAMED)
|
||||
#define FUSION_INCLUDE_ADAPT_ADT_NAMED
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_class_named.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
|
||||
|
||||
#endif
|
@ -5,9 +5,9 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_CLASS_NAMED_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_NAMED_HPP
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_ADT_NAMED_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_ADT_NAMED_HPP
|
||||
|
||||
#include <boost/fusion/adapted/class/adapt_class_named.hpp>
|
||||
#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
|
||||
|
||||
#endif
|
13
include/boost/fusion/include/adapt_assoc_adt.hpp
Normal file
13
include/boost/fusion/include/adapt_assoc_adt.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADR_HPP
|
||||
|
||||
#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
|
||||
|
||||
#endif
|
13
include/boost/fusion/include/adapt_assoc_adt_named.hpp
Normal file
13
include/boost/fusion/include/adapt_assoc_adt_named.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_NAMED_HPP
|
||||
#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_ADT_NAMED_HPP
|
||||
|
||||
#include <boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp>
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user