diff --git a/include/boost/fusion/adapted.hpp b/include/boost/fusion/adapted.hpp index 09684204..bdd7b8cc 100644 --- a/include/boost/fusion/adapted.hpp +++ b/include/boost/fusion/adapted.hpp @@ -8,10 +8,10 @@ #if !defined(BOOST_FUSION_ADAPTED_30122005_1420) #define BOOST_FUSION_ADAPTED_30122005_1420 +#include #include #include #include -#include #include #include #include diff --git a/include/boost/fusion/adapted/class.hpp b/include/boost/fusion/adapted/adt.hpp similarity index 58% rename from include/boost/fusion/adapted/class.hpp rename to include/boost/fusion/adapted/adt.hpp index 75150942..c9d9f279 100644 --- a/include/boost/fusion/adapted/class.hpp +++ b/include/boost/fusion/adapted/adt.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 -#include -#include -#include +#include +#include +#include +#include #endif diff --git a/include/boost/fusion/adapted/class/adapt_class.hpp b/include/boost/fusion/adapted/adt/adapt_adt.hpp similarity index 69% rename from include/boost/fusion/adapted/class/adapt_class.hpp rename to include/boost/fusion/adapted/adt/adapt_adt.hpp index fdd56216..c7f56871 100644 --- a/include/boost/fusion/adapted/class/adapt_class.hpp +++ b/include/boost/fusion/adapted/adt/adapt_adt.hpp @@ -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 #include @@ -29,46 +29,46 @@ #include #include #include -#include -#include +#include +#include -#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 diff --git a/include/boost/fusion/adapted/class/adapt_class_named.hpp b/include/boost/fusion/adapted/adt/adapt_adt_named.hpp similarity index 72% rename from include/boost/fusion/adapted/class/adapt_class_named.hpp rename to include/boost/fusion/adapted/adt/adapt_adt_named.hpp index bbc1d1ae..c2ace013 100644 --- a/include/boost/fusion/adapted/class/adapt_class_named.hpp +++ b/include/boost/fusion/adapted/adt/adapt_adt_named.hpp @@ -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 +#include #include -#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 diff --git a/include/boost/fusion/adapted/class/adapt_assoc_class.hpp b/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp similarity index 74% rename from include/boost/fusion/adapted/class/adapt_assoc_class.hpp rename to include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp index 60d8d9e4..b67ba2c5 100644 --- a/include/boost/fusion/adapted/class/adapt_assoc_class.hpp +++ b/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp @@ -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 #include @@ -32,20 +32,20 @@ #include #include #include -#include -#include +#include +#include -#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 diff --git a/include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp b/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp similarity index 69% rename from include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp rename to include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp index 99e45ada..b8759825 100644 --- a/include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp +++ b/include/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp @@ -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 +#include #include -#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 diff --git a/include/boost/fusion/adapted/class/detail/adapt_base.hpp b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp similarity index 66% rename from include/boost/fusion/adapted/class/detail/adapt_base.hpp rename to include/boost/fusion/adapted/adt/detail/adapt_base.hpp index 9906535e..ac618cb6 100644 --- a/include/boost/fusion/adapted/class/detail/adapt_base.hpp +++ b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp @@ -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_DETAIL_ADAPT_BASE_HPP -#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP +#ifndef BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP +#define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP #include #include @@ -16,48 +16,73 @@ #include #include -//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)\ +#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_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL( \ +#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL( \ TEMPLATE_PARAMS_SEQ) \ \ lvalue -#define BOOST_FUSION_ADAPT_CLASS_C_BASE(\ +#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::class_member_proxy< \ + struct access::adt_attribute_proxy< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ + , true \ > \ { \ - typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \ - typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) rvalue; \ + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) type; \ \ - class_member_proxy(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& o) \ + explicit \ + adt_attribute_proxy( \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& o) \ + : obj(o) \ + {} \ + \ + operator type() const \ + { \ + return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ + } \ + \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj; \ + \ + private: \ + adt_attribute_proxy& operator= (adt_attribute_proxy const&); \ + }; \ + \ + template< \ + BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ + > \ + struct access::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)& o) \ : obj(o) \ {} \ \ template \ - class_member_proxy& \ + adt_attribute_proxy& \ operator=(Arg const& val) \ { \ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \ return *this; \ } \ \ - operator lvalue() \ + operator type() const \ { \ return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ } \ @@ -65,7 +90,7 @@ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ \ private: \ - class_member_proxy& operator= (class_member_proxy const&); \ + adt_attribute_proxy& operator= (adt_attribute_proxy const&); \ }; \ \ template< \ @@ -83,8 +108,8 @@ 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)( \ + BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL, \ + BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_NON_TEMPLATE_IMPL)( \ TEMPLATE_PARAMS_SEQ) \ type; \ \ @@ -92,30 +117,17 @@ struct apply \ { \ typedef \ - access::class_member_proxy< \ + access::adt_attribute_proxy< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ + , is_const::value \ > \ - proxy; \ - \ - typedef typename \ - mpl::if_< \ - is_const \ - , BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \ - , proxy \ - >::type \ type; \ \ - static proxy \ - call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \ + static type \ + call(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); \ + return type(obj); \ } \ }; \ }; diff --git a/include/boost/fusion/adapted/class/detail/extension.hpp b/include/boost/fusion/adapted/adt/detail/extension.hpp similarity index 86% rename from include/boost/fusion/adapted/class/detail/extension.hpp rename to include/boost/fusion/adapted/adt/detail/extension.hpp index ae800275..50c40cf3 100644 --- a/include/boost/fusion/adapted/class/detail/extension.hpp +++ b/include/boost/fusion/adapted/adt/detail/extension.hpp @@ -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_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 #include diff --git a/include/boost/fusion/adapted/struct/detail/extension.hpp b/include/boost/fusion/adapted/struct/detail/extension.hpp index 302952b1..6d715753 100644 --- a/include/boost/fusion/adapted/struct/detail/extension.hpp +++ b/include/boost/fusion/adapted/struct/detail/extension.hpp @@ -32,8 +32,8 @@ namespace boost { namespace fusion template struct struct_member; - template - struct class_member_proxy; + template + struct adt_attribute_proxy; }; template diff --git a/include/boost/fusion/include/adapt_class.hpp b/include/boost/fusion/include/adapt_adt.hpp similarity index 71% rename from include/boost/fusion/include/adapt_class.hpp rename to include/boost/fusion/include/adapt_adt.hpp index 77f519be..87ef15e8 100644 --- a/include/boost/fusion/include/adapt_class.hpp +++ b/include/boost/fusion/include/adapt_adt.hpp @@ -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 +#include #endif diff --git a/include/boost/fusion/include/adapted_class_named.cpp b/include/boost/fusion/include/adapt_adt_named.cpp similarity index 71% rename from include/boost/fusion/include/adapted_class_named.cpp rename to include/boost/fusion/include/adapt_adt_named.cpp index 0002ad6f..8ac033a0 100644 --- a/include/boost/fusion/include/adapted_class_named.cpp +++ b/include/boost/fusion/include/adapt_adt_named.cpp @@ -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 +#include #endif diff --git a/include/boost/fusion/include/adapt_class_named.hpp b/include/boost/fusion/include/adapt_adt_named.hpp similarity index 69% rename from include/boost/fusion/include/adapt_class_named.hpp rename to include/boost/fusion/include/adapt_adt_named.hpp index 81136a1f..308249e8 100644 --- a/include/boost/fusion/include/adapt_class_named.hpp +++ b/include/boost/fusion/include/adapt_adt_named.hpp @@ -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 +#include #endif diff --git a/include/boost/fusion/include/adapt_assoc_adt.hpp b/include/boost/fusion/include/adapt_assoc_adt.hpp new file mode 100644 index 00000000..55bd5514 --- /dev/null +++ b/include/boost/fusion/include/adapt_assoc_adt.hpp @@ -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 + +#endif diff --git a/include/boost/fusion/include/adapt_assoc_adt_named.hpp b/include/boost/fusion/include/adapt_assoc_adt_named.hpp new file mode 100644 index 00000000..aa356e75 --- /dev/null +++ b/include/boost/fusion/include/adapt_assoc_adt_named.hpp @@ -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 + +#endif diff --git a/test/Jamfile b/test/Jamfile index dba81ec5..302d65b7 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -111,24 +111,24 @@ import testing ; [ run sequence/zip_view2.cpp : : : : ] [ run sequence/zip_view_ignore.cpp : : : : ] [ run sequence/repetitive_view.cpp : : : : ] - [ run sequence/deduce_sequence.cpp : : : : ] - [ run sequence/adapt_assoc_class_named.cpp : : : : ] - [ run sequence/adapt_assoc_class.cpp : : : : ] + [ run sequence/deduce_sequence.cpp : : : : ] + [ run sequence/adapt_adt_named.cpp : : : : ] + [ run sequence/adapt_adt.cpp : : : : ] + [ run sequence/adapt_assoc_adt_named.cpp : : : : ] + [ run sequence/adapt_assoc_adt.cpp : : : : ] [ run sequence/adapt_assoc_struct_named.cpp : : : : ] [ run sequence/adapt_assoc_struct.cpp : : : : ] - [ run sequence/adapt_assoc_tpl_class.cpp : : : : ] + [ run sequence/adapt_assoc_tpl_adt.cpp : : : : ] [ run sequence/adapt_assoc_tpl_struct.cpp : : : : ] - [ run sequence/adapt_class_named.cpp : : : : ] - [ run sequence/adapt_class.cpp : : : : ] [ run sequence/adapt_struct_named.cpp : : : : ] [ run sequence/adapt_struct.cpp : : : : ] - [ run sequence/adapt_tpl_class.cpp : : : : ] + [ run sequence/adapt_tpl_adt.cpp : : : : ] [ run sequence/adapt_tpl_struct.cpp : : : : ] [ run sequence/define_struct.cpp : : : : ] [ run sequence/define_assoc_struct.cpp : : : : ] [ run sequence/define_tpl_struct.cpp : : : : ] [ run sequence/define_assoc_tpl_struct.cpp : : : : ] - + [ run functional/fused.cpp : : : : ] [ run functional/fused_function_object.cpp : : : : ] [ run functional/fused_procedure.cpp : : : : ] diff --git a/test/sequence/adapt_class.cpp b/test/sequence/adapt_adt.cpp similarity index 97% rename from test/sequence/adapt_class.cpp rename to test/sequence/adapt_adt.cpp index a1016ee3..bfbd5fac 100644 --- a/test/sequence/adapt_class.cpp +++ b/test/sequence/adapt_adt.cpp @@ -5,7 +5,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #include #include #include @@ -72,14 +72,14 @@ namespace ns #endif } -BOOST_FUSION_ADAPT_CLASS( +BOOST_FUSION_ADAPT_ADT( ns::point, (int, int, obj.get_x(), obj.set_x(val)) (int, int, obj.get_y(), obj.set_y(val)) ) #if !BOOST_WORKAROUND(__GNUC__,<4) -BOOST_FUSION_ADAPT_CLASS( +BOOST_FUSION_ADAPT_ADT( ns::point_with_private_members, (int, int, obj.get_x(), obj.set_x(val)) (int, int, obj.get_y(), obj.set_y(val)) diff --git a/test/sequence/adapt_class_named.cpp b/test/sequence/adapt_adt_named.cpp similarity index 97% rename from test/sequence/adapt_class_named.cpp rename to test/sequence/adapt_adt_named.cpp index 8321a8be..7ec88df8 100644 --- a/test/sequence/adapt_class_named.cpp +++ b/test/sequence/adapt_adt_named.cpp @@ -5,7 +5,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #include #include #include @@ -53,7 +53,7 @@ namespace ns } // this creates a fusion view: boost::fusion::adapted::point -BOOST_FUSION_ADAPT_CLASS_NAMED( +BOOST_FUSION_ADAPT_ADT_NAMED( ns::point, point, (int, int, obj.obj.get_x(), obj.obj.set_x(val)) (int, int, obj.obj.get_y(), obj.obj.set_y(val)) diff --git a/test/sequence/adapt_assoc_class.cpp b/test/sequence/adapt_assoc_adt.cpp similarity index 97% rename from test/sequence/adapt_assoc_class.cpp rename to test/sequence/adapt_assoc_adt.cpp index 67f1c657..2d6a07f0 100644 --- a/test/sequence/adapt_assoc_class.cpp +++ b/test/sequence/adapt_assoc_adt.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ namespace ns }; } -BOOST_FUSION_ADAPT_ASSOC_CLASS( +BOOST_FUSION_ADAPT_ASSOC_ADT( ns::point, (int, int, obj.get_x(), obj.set_x(val), ns::x_member) (int, int, obj.get_y(), obj.set_y(val), ns::y_member) diff --git a/test/sequence/adapt_assoc_class_named.cpp b/test/sequence/adapt_assoc_adt_named.cpp similarity index 97% rename from test/sequence/adapt_assoc_class_named.cpp rename to test/sequence/adapt_assoc_adt_named.cpp index 0979970c..844bec7e 100644 --- a/test/sequence/adapt_assoc_class_named.cpp +++ b/test/sequence/adapt_assoc_adt_named.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ namespace ns }; } -BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED( +BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( ns::point, point, (int, int, obj.obj.get_x(), obj.obj.set_x(val), ns::x_member) diff --git a/test/sequence/adapt_assoc_tpl_class.cpp b/test/sequence/adapt_assoc_tpl_adt.cpp similarity index 97% rename from test/sequence/adapt_assoc_tpl_class.cpp rename to test/sequence/adapt_assoc_tpl_adt.cpp index d0647ae7..92d9df60 100644 --- a/test/sequence/adapt_assoc_tpl_class.cpp +++ b/test/sequence/adapt_assoc_tpl_adt.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,7 +46,7 @@ namespace ns }; } -BOOST_FUSION_ADAPT_ASSOC_TPL_CLASS( +BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( (X)(Y), (ns::point)(X)(Y), (X, X, obj.get_x(), obj.set_x(val), ns::x_member) diff --git a/test/sequence/adapt_tpl_class.cpp b/test/sequence/adapt_tpl_adt.cpp similarity index 97% rename from test/sequence/adapt_tpl_class.cpp rename to test/sequence/adapt_tpl_adt.cpp index 2478a570..e6981ddf 100644 --- a/test/sequence/adapt_tpl_class.cpp +++ b/test/sequence/adapt_tpl_adt.cpp @@ -5,7 +5,7 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ namespace ns }; } -BOOST_FUSION_ADAPT_TPL_CLASS( +BOOST_FUSION_ADAPT_TPL_ADT( (X)(Y), (ns::point)(X)(Y), (X, X, obj.get_x(), obj.set_x(val))