Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65439 - in trunk: boost/fusion boost/fusion/adapted boost/fusion/adapted/adt boost/fusion/adapted/adt/detail boost/fusion/adapted/class boost/fusion/adapted/struct/detail boost/fusion/include boost/spirit/home/support boost/spirit/include libs/fusion/test libs/fusion/test/sequence libs/spirit/example/karma
From: mr.chr.schmidt_at_[hidden]
Date: 2010-09-16 12:33:35


Author: cschmidt
Date: 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
New Revision: 65439
URL: http://svn.boost.org/trac/boost/changeset/65439

Log:
Fusion: BOOST_FUSION_ADAPT_xxxCLASSxxx -> BOOST_FUSION_ADAPT_xxxADTxxx
Added:
   trunk/boost/fusion/adapted/adt/
   trunk/boost/fusion/adapted/adt.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/adapt_adt.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/adapt_adt_named.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/adapt_assoc_adt.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/detail/
   trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp (contents, props changed)
   trunk/boost/fusion/adapted/adt/detail/extension.hpp (contents, props changed)
   trunk/boost/fusion/include/adapt_adt.hpp (contents, props changed)
   trunk/boost/fusion/include/adapt_adt_named.cpp (contents, props changed)
   trunk/boost/fusion/include/adapt_adt_named.hpp (contents, props changed)
   trunk/boost/fusion/include/adapt_assoc_adt.hpp (contents, props changed)
   trunk/boost/fusion/include/adapt_assoc_adt_named.hpp (contents, props changed)
   trunk/boost/spirit/home/support/adapt_adt_attributes.hpp
      - copied, changed from r65417, /trunk/boost/spirit/home/support/adapt_class_attributes.hpp
   trunk/boost/spirit/include/support_adapt_adt_attributes.hpp
      - copied, changed from r65417, /trunk/boost/spirit/include/support_adapt_class_attributes.hpp
   trunk/libs/fusion/test/sequence/adapt_adt.cpp (contents, props changed)
   trunk/libs/fusion/test/sequence/adapt_adt_named.cpp (contents, props changed)
   trunk/libs/fusion/test/sequence/adapt_assoc_adt.cpp (contents, props changed)
   trunk/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp (contents, props changed)
   trunk/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp (contents, props changed)
   trunk/libs/fusion/test/sequence/adapt_tpl_adt.cpp (contents, props changed)
Removed:
   trunk/boost/fusion/adapted/class/
   trunk/boost/fusion/adapted/class.hpp
   trunk/boost/fusion/include/adapt_class.hpp
   trunk/boost/fusion/include/adapt_class_named.hpp
   trunk/boost/fusion/include/adapted_class_named.cpp
   trunk/boost/spirit/home/support/adapt_class_attributes.hpp
   trunk/boost/spirit/include/support_adapt_class_attributes.hpp
   trunk/libs/fusion/test/sequence/adapt_assoc_class.cpp
   trunk/libs/fusion/test/sequence/adapt_assoc_class_named.cpp
   trunk/libs/fusion/test/sequence/adapt_assoc_tpl_class.cpp
   trunk/libs/fusion/test/sequence/adapt_class.cpp
   trunk/libs/fusion/test/sequence/adapt_class_named.cpp
   trunk/libs/fusion/test/sequence/adapt_tpl_class.cpp
Text files modified:
   trunk/boost/fusion/adapted.hpp | 2
   trunk/boost/fusion/adapted/struct/detail/extension.hpp | 4
   trunk/boost/spirit/home/support/adapt_adt_attributes.hpp | 112 ++++++++++++++++++++++++++-------------
   trunk/boost/spirit/home/support/attributes.hpp | 2
   trunk/boost/spirit/home/support/attributes_fwd.hpp | 2
   trunk/boost/spirit/include/support_adapt_adt_attributes.hpp | 6 +-
   trunk/libs/fusion/test/Jamfile | 16 ++--
   trunk/libs/spirit/example/karma/complex_number_adapt.cpp | 4
   8 files changed, 92 insertions(+), 56 deletions(-)

Modified: trunk/boost/fusion/adapted.hpp
==============================================================================
--- trunk/boost/fusion/adapted.hpp (original)
+++ trunk/boost/fusion/adapted.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -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>

Added: trunk/boost/fusion/adapted/adt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 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_HPP
+#define BOOST_FUSION_ADAPTED_ADT_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

Added: trunk/boost/fusion/adapted/adt/adapt_adt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/adapt_adt.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,74 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2009-2010 Hartmut Kaiser
+ 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_ADAPT_ADT_HPP
+#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#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/adt/detail/extension.hpp>
+#include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
+
+#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_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_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_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ADT_C)
+
+#define BOOST_FUSION_ADAPT_ADT(NAME, ATTRIBUTES) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (0), \
+ (0)(NAME), \
+ struct_tag, \
+ 0, \
+ BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ADT_C)
+
+#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_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ADT_C)
+
+
+#endif

Added: trunk/boost/fusion/adapted/adt/adapt_adt_named.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/adapt_adt_named.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2009-2010 Hartmut Kaiser
+ 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_ADAPT_ADT_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ADT_NAMED_HPP
+
+#include <boost/fusion/adapted/adt/adapt_adt.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#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_ADT_AS_VIEW( \
+ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
+ ATTRIBUTES)
+
+#define BOOST_FUSION_ADAPT_ADT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
+ BOOST_FUSION_ADAPT_ADT_NAMED_NS( \
+ WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
+
+#endif

Added: trunk/boost/fusion/adapted/adt/adapt_assoc_adt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/adapt_assoc_adt.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,87 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2007 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_ADAPT_ASSOC_ADT_HPP
+#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#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/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/adt/detail/extension.hpp>
+#include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
+
+#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_ADT_C( \
+ TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \
+ \
+ 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) \
+ > \
+ struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(5, 4, ATTRIBUTE) type; \
+ };
+
+#define BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( \
+ TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \
+ \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (1)TEMPLATE_PARAMS_SEQ, \
+ (1)NAME_SEQ, \
+ assoc_struct_tag, \
+ 0, \
+ BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ASSOC_ADT_C)
+
+#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_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ASSOC_ADT_C)
+
+#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_ADT_FILLER_0 ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_ASSOC_ADT_C)
+
+#endif

Added: trunk/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ 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_ADAPT_ASSOC_ADT_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_ADT_ADAPT_ASSOC_ADT_NAMED_HPP
+
+#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#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_ADT_AS_VIEW( \
+ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
+ ATTRIBUTES)
+
+#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

Added: trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/detail/adapt_base.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,135 @@
+/*=============================================================================
+ 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) \
+ \
+ lvalue
+
+#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_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& 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 Arg> \
+ adt_attribute_proxy& \
+ operator=(Arg const& val) \
+ { \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \
+ return *this; \
+ } \
+ \
+ operator type() const \
+ { \
+ return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
+ } \
+ \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
+ \
+ private: \
+ adt_attribute_proxy& operator= (adt_attribute_proxy const&); \
+ }; \
+ \
+ 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 \
+ access::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

Added: trunk/boost/fusion/adapted/adt/detail/extension.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/adapted/adt/detail/extension.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,24 @@
+/*=============================================================================
+ 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_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 detail
+{
+ template <typename T, typename Dummy>
+ struct get_identity
+ : remove_const<typename remove_reference<T>::type>
+ {};
+}}}
+
+#endif

Deleted: trunk/boost/fusion/adapted/class.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,18 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2006 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_HPP
-#define BOOST_FUSION_ADAPTED_CLASS_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>
-
-#endif

Modified: trunk/boost/fusion/adapted/struct/detail/extension.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/extension.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/extension.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -32,8 +32,8 @@
             template<typename Seq, int N>
             struct struct_member;
 
- template <typename T, int N>
- struct class_member_proxy;
+ template <typename T, int N, bool Const>
+ struct adt_attribute_proxy;
         };
 
         template<typename Seq, int N>

Added: trunk/boost/fusion/include/adapt_adt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/include/adapt_adt.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_ADT_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ADT_HPP
+
+#include <boost/fusion/adapted/adt/adapt_adt.hpp>
+
+#endif

Added: trunk/boost/fusion/include/adapt_adt_named.cpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/include/adapt_adt_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,12 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+
+ 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_ADT_NAMED)
+#define FUSION_INCLUDE_ADAPT_ADT_NAMED
+
+#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
+
+#endif

Added: trunk/boost/fusion/include/adapt_adt_named.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/include/adapt_adt_named.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -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_ADT_NAMED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ADT_NAMED_HPP
+
+#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
+
+#endif

Added: trunk/boost/fusion/include/adapt_assoc_adt.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/include/adapt_assoc_adt.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -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

Added: trunk/boost/fusion/include/adapt_assoc_adt_named.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/fusion/include/adapt_assoc_adt_named.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -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

Deleted: trunk/boost/fusion/include/adapt_class.hpp
==============================================================================
--- trunk/boost/fusion/include/adapt_class.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
-
- 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_CLASS_HPP
-#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_HPP
-
-#include <boost/fusion/adapted/class/adapt_class.hpp>
-
-#endif

Deleted: trunk/boost/fusion/include/adapt_class_named.hpp
==============================================================================
--- trunk/boost/fusion/include/adapt_class_named.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,13 +0,0 @@
-/*=============================================================================
- 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_CLASS_NAMED_HPP
-#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_NAMED_HPP
-
-#include <boost/fusion/adapted/class/adapt_class_named.hpp>
-
-#endif

Deleted: trunk/boost/fusion/include/adapted_class_named.cpp
==============================================================================
--- trunk/boost/fusion/include/adapted_class_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,12 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
-
- 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
-
-#include <boost/fusion/adapted/class/adapt_class_named.hpp>
-
-#endif

Copied: trunk/boost/spirit/home/support/adapt_adt_attributes.hpp (from r65417, /trunk/boost/spirit/home/support/adapt_class_attributes.hpp)
==============================================================================
--- /trunk/boost/spirit/home/support/adapt_class_attributes.hpp (original)
+++ trunk/boost/spirit/home/support/adapt_adt_attributes.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -3,8 +3,8 @@
 // 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(BOOST_SPIRIT_ADAPT_CLASS_ATTRIBUTES_JAN_27_2010_1219PM)
-#define BOOST_SPIRIT_ADAPT_CLASS_ATTRIBUTES_JAN_27_2010_1219PM
+#if !defined(BOOST_SPIRIT_ADAPT_ADT_ATTRIBUTES_SEP_15_2010_1219PM)
+#define BOOST_SPIRIT_ADAPT_ADT_ATTRIBUTES_SEP_15_2010_1219PM
 
 #if defined(_MSC_VER)
 #pragma once
@@ -12,7 +12,7 @@
 
 #include <boost/spirit/home/support/attributes.hpp>
 #include <boost/spirit/home/support/container.hpp>
-#include <boost/fusion/include/adapt_class.hpp>
+#include <boost/fusion/include/adapt_adt.hpp>
 #include <boost/utility/enable_if.hpp>
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -20,117 +20,153 @@
 namespace boost { namespace spirit { namespace traits
 {
     ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N>
- struct is_container<fusion::extension::access::class_member_proxy<T, N> >
+ template <typename T, int N, bool Const>
+ struct is_container<
+ fusion::extension::access::adt_attribute_proxy<T, N, Const> >
       : is_container<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >
     {};
 
- template <typename T, int N>
- struct container_value<fusion::extension::access::class_member_proxy<T, N> >
+ template <typename T, int N, bool Const>
+ struct container_value<
+ fusion::extension::access::adt_attribute_proxy<T, N, Const> >
       : container_value<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >
     {};
 
     template <typename T, int N, typename Val>
- struct push_back_container<fusion::extension::access::class_member_proxy<T, N>, Val
+ struct push_back_container<
+ fusion::extension::access::adt_attribute_proxy<T, N, false>
+ , Val
       , typename enable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, false
+ >::type
> >::type>
     {
- static bool call(fusion::extension::access::class_member_proxy<T, N>& p
+ static bool call(
+ fusion::extension::access::adt_attribute_proxy<T, N, false>& p
           , Val const& val)
         {
             typedef typename
- fusion::extension::access::class_member_proxy<T, N>::lvalue
+ fusion::extension::access::adt_attribute_proxy<
+ T, N, false
+ >::type
             type;
             return push_back(type(p), val);
         }
     };
 
- template <typename T, int N>
- struct container_iterator<fusion::extension::access::class_member_proxy<T, N> >
+ template <typename T, int N, bool Const>
+ struct container_iterator<
+ fusion::extension::access::adt_attribute_proxy<T, N, Const> >
       : container_iterator<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >
     {};
 
     ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N, typename Val>
+ template <typename T, int N, bool Const, typename Val>
     struct assign_to_attribute_from_value<
- fusion::extension::access::class_member_proxy<T, N>, Val>
+ fusion::extension::access::adt_attribute_proxy<T, N, Const>, Val>
     {
         static void
         call(Val const& val
- , fusion::extension::access::class_member_proxy<T, N>& attr)
+ , fusion::extension::access::adt_attribute_proxy<T, N, Const>& attr)
         {
             attr = val;
         }
     };
 
     ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N>
- struct attribute_type<fusion::extension::access::class_member_proxy<T, N> >
- : fusion::extension::access::class_member_proxy<T, N>
+ template <typename T, int N, bool Const>
+ struct attribute_type<
+ fusion::extension::access::adt_attribute_proxy<T, N, Const> >
+ : fusion::extension::access::adt_attribute_proxy<T, N, Const>
     {};
 
     ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N, typename Attribute, typename Domain>
+ template <
+ typename T, int N, bool Const, typename Attribute, typename Domain>
     struct transform_attribute<
- fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
+ fusion::extension::access::adt_attribute_proxy<T, N, Const>
+ , Attribute
+ , Domain
       , typename disable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
> >::type>
     {
         typedef Attribute type;
 
         static Attribute
- pre(fusion::extension::access::class_member_proxy<T, N>& val)
+ pre(fusion::extension::access::adt_attribute_proxy<T, N, Const>& val)
         {
             return val;
         }
         static void
- post(fusion::extension::access::class_member_proxy<T, N>& val
+ post(fusion::extension::access::adt_attribute_proxy<T, N, Const>& val
           , Attribute const& attr)
         {
             val = attr;
         }
         static void
- fail(fusion::extension::access::class_member_proxy<T, N>&)
+ fail(fusion::extension::access::adt_attribute_proxy<T, N, Const>&)
         {
         }
     };
 
- template <typename T, int N, typename Attribute, typename Domain>
+ template <
+ typename T, int N, bool Const, typename Attribute, typename Domain>
     struct transform_attribute<
- fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
+ fusion::extension::access::adt_attribute_proxy<T, N, Const>
+ , Attribute
+ , Domain
       , typename enable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
+ typename fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
> >::type>
     {
         typedef Attribute& type;
 
         static Attribute&
- pre(fusion::extension::access::class_member_proxy<T, N>& val)
+ pre(fusion::extension::access::adt_attribute_proxy<T, N, Const>& val)
         {
             return val;
         }
         static void
- post(fusion::extension::access::class_member_proxy<T, N>&, Attribute const&)
+ post(
+ fusion::extension::access::adt_attribute_proxy<T, N, Const>&
+ , Attribute const&)
         {
         }
         static void
- fail(fusion::extension::access::class_member_proxy<T, N>&)
+ fail(fusion::extension::access::adt_attribute_proxy<T, N, Const>&)
         {
         }
     };
 
- template <typename T, int N>
- struct clear_value<fusion::extension::access::class_member_proxy<T, N> >
+ template <typename T, int N, bool Const>
+ struct clear_value<
+ fusion::extension::access::adt_attribute_proxy<T, N, Const> >
     {
- static void call(fusion::extension::access::class_member_proxy<T, N>& val)
+ static void call(
+ fusion::extension::access::adt_attribute_proxy<T, N, Const>& val)
         {
             typedef typename
- fusion::extension::access::class_member_proxy<T, N>::lvalue
+ fusion::extension::access::adt_attribute_proxy<
+ T, N, Const
+ >::type
             type;
             clear(type(val));
         }

Deleted: trunk/boost/spirit/home/support/adapt_class_attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/adapt_class_attributes.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,140 +0,0 @@
-// Copyright (c) 2001-2010 Hartmut Kaiser
-//
-// 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(BOOST_SPIRIT_ADAPT_CLASS_ATTRIBUTES_JAN_27_2010_1219PM)
-#define BOOST_SPIRIT_ADAPT_CLASS_ATTRIBUTES_JAN_27_2010_1219PM
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/spirit/home/support/attributes.hpp>
-#include <boost/spirit/home/support/container.hpp>
-#include <boost/fusion/include/adapt_class.hpp>
-#include <boost/utility/enable_if.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// customization points allowing to use adapted classes with spirit
-namespace boost { namespace spirit { namespace traits
-{
- ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N>
- struct is_container<fusion::extension::access::class_member_proxy<T, N> >
- : is_container<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- {};
-
- template <typename T, int N>
- struct container_value<fusion::extension::access::class_member_proxy<T, N> >
- : container_value<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- {};
-
- template <typename T, int N, typename Val>
- struct push_back_container<fusion::extension::access::class_member_proxy<T, N>, Val
- , typename enable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
- > >::type>
- {
- static bool call(fusion::extension::access::class_member_proxy<T, N>& p
- , Val const& val)
- {
- typedef typename
- fusion::extension::access::class_member_proxy<T, N>::lvalue
- type;
- return push_back(type(p), val);
- }
- };
-
- template <typename T, int N>
- struct container_iterator<fusion::extension::access::class_member_proxy<T, N> >
- : container_iterator<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue>
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N, typename Val>
- struct assign_to_attribute_from_value<
- fusion::extension::access::class_member_proxy<T, N>, Val>
- {
- static void
- call(Val const& val
- , fusion::extension::access::class_member_proxy<T, N>& attr)
- {
- attr = val;
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N>
- struct attribute_type<fusion::extension::access::class_member_proxy<T, N> >
- : fusion::extension::access::class_member_proxy<T, N>
- {};
-
- ///////////////////////////////////////////////////////////////////////////
- template <typename T, int N, typename Attribute, typename Domain>
- struct transform_attribute<
- fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
- , typename disable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
- > >::type>
- {
- typedef Attribute type;
-
- static Attribute
- pre(fusion::extension::access::class_member_proxy<T, N>& val)
- {
- return val;
- }
- static void
- post(fusion::extension::access::class_member_proxy<T, N>& val
- , Attribute const& attr)
- {
- val = attr;
- }
- static void
- fail(fusion::extension::access::class_member_proxy<T, N>&)
- {
- }
- };
-
- template <typename T, int N, typename Attribute, typename Domain>
- struct transform_attribute<
- fusion::extension::access::class_member_proxy<T, N>, Attribute, Domain
- , typename enable_if<is_reference<
- typename fusion::extension::access::class_member_proxy<T, N>::lvalue
- > >::type>
- {
- typedef Attribute& type;
-
- static Attribute&
- pre(fusion::extension::access::class_member_proxy<T, N>& val)
- {
- return val;
- }
- static void
- post(fusion::extension::access::class_member_proxy<T, N>&, Attribute const&)
- {
- }
- static void
- fail(fusion::extension::access::class_member_proxy<T, N>&)
- {
- }
- };
-
- template <typename T, int N>
- struct clear_value<fusion::extension::access::class_member_proxy<T, N> >
- {
- static void call(fusion::extension::access::class_member_proxy<T, N>& val)
- {
- typedef typename
- fusion::extension::access::class_member_proxy<T, N>::lvalue
- type;
- clear(type(val));
- }
- };
-}}}
-
-#endif

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -247,7 +247,7 @@
     // Retrieve the attribute type to use from the given type
     //
     // This is needed to extract the correct attribute type from proxy classes
- // as utilized in FUSION_ADAPT_CLASS
+ // as utilized in FUSION_ADAPT_ADT et. al.
     ///////////////////////////////////////////////////////////////////////////
     template <typename Attribute, typename Enable/* = void*/>
     struct attribute_type : mpl::identity<Attribute> {};

Modified: trunk/boost/spirit/home/support/attributes_fwd.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes_fwd.hpp (original)
+++ trunk/boost/spirit/home/support/attributes_fwd.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -54,7 +54,7 @@
     // Retrieve the attribute type to use from the given type
     //
     // This is needed to extract the correct attribute type from proxy classes
- // as utilized in FUSION_ADAPT_CLASS
+ // as utilized in FUSION_ADAPT_ADT et. al.
     ///////////////////////////////////////////////////////////////////////////
     template <typename Attribute, typename Enable = void>
     struct attribute_type;

Copied: trunk/boost/spirit/include/support_adapt_adt_attributes.hpp (from r65417, /trunk/boost/spirit/include/support_adapt_class_attributes.hpp)
==============================================================================
--- /trunk/boost/spirit/include/support_adapt_class_attributes.hpp (original)
+++ trunk/boost/spirit/include/support_adapt_adt_attributes.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -6,13 +6,13 @@
     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_SPIRIT_INCLUDE_SUPPORT_ADAPT_CLASS_ATTRIBUTES
-#define BOOST_SPIRIT_INCLUDE_SUPPORT_ADAPT_CLASS_ATTRIBUTES
+#ifndef BOOST_SPIRIT_INCLUDE_SUPPORT_ADAPT_ADT_ATTRIBUTES
+#define BOOST_SPIRIT_INCLUDE_SUPPORT_ADAPT_ADT_ATTRIBUTES
 
 #if defined(_MSC_VER)
 #pragma once
 #endif
 
-#include <boost/spirit/home/support/adapt_class_attributes.hpp>
+#include <boost/spirit/home/support/adapt_adt_attributes.hpp>
 
 #endif

Deleted: trunk/boost/spirit/include/support_adapt_class_attributes.hpp
==============================================================================
--- trunk/boost/spirit/include/support_adapt_class_attributes.hpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,18 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2010 Joel de Guzman
- Copyright (c) 2001-2010 Hartmut Kaiser
- http://spirit.sourceforge.net/
-
- 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_SPIRIT_INCLUDE_SUPPORT_ADAPT_CLASS_ATTRIBUTES
-#define BOOST_SPIRIT_INCLUDE_SUPPORT_ADAPT_CLASS_ATTRIBUTES
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/spirit/home/support/adapt_class_attributes.hpp>
-
-#endif

Modified: trunk/libs/fusion/test/Jamfile
==============================================================================
--- trunk/libs/fusion/test/Jamfile (original)
+++ trunk/libs/fusion/test/Jamfile 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -111,24 +111,24 @@
     [ 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 : : : : ]

Added: trunk/libs/fusion/test/sequence/adapt_adt.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_adt.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,179 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/adt/adapt_adt.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(int in_x, int in_y) : x(in_x), y(in_y) {}
+
+ int get_x() const { return x; }
+ int get_y() const { return y; }
+ void set_x(int x_) { x = x_; }
+ void set_y(int y_) { y = y_; }
+
+ private:
+
+ int x;
+ int y;
+ };
+
+#if !BOOST_WORKAROUND(__GNUC__,<4)
+ class point_with_private_members
+ {
+ friend struct boost::fusion::extension::access;
+
+ public:
+ point_with_private_members() : x(0), y(0) {}
+ point_with_private_members(int x, int y) : x(x), y(y) {}
+
+ private:
+ int get_x() const { return x; }
+ int get_y() const { return y; }
+ void set_x(int x_) { x = x_; }
+ void set_y(int y_) { y = y_; }
+
+ int x;
+ int y;
+ };
+#endif
+}
+
+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_ADT(
+ ns::point_with_private_members,
+ (int, int, obj.get_x(), obj.set_x(val))
+ (int, int, obj.get_y(), obj.set_y(val))
+)
+#endif
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
+ ns::point p(123, 456);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 2);
+ ns::point v2(5, 3);
+ fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from ns::point to vector
+ ns::point p(5, 3);
+ fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from ns::point to list
+ ns::point p(5, 3);
+ fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((mpl::is_sequence<ns::point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ fusion::result_of::value_at_c<ns::point,0>::type
+ , mpl::front<ns::point>::type>));
+ }
+
+#if !BOOST_WORKAROUND(__GNUC__,<4)
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point_with_private_members>));
+ ns::point_with_private_members p(123, 456);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<ns::point_with_private_members>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<ns::point_with_private_members>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+#endif
+
+ return boost::report_errors();
+}
+

Added: trunk/libs/fusion/test/sequence/adapt_adt_named.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_adt_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,137 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/adt/adapt_adt_named.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(int in_x, int in_y) : x(in_x), y(in_y) {}
+
+ int get_x() const { return x; }
+ int get_y() const { return y; }
+ void set_x(int x_) { x = x_; }
+ void set_y(int y_) { y = y_; }
+
+ private:
+
+ int x;
+ int y;
+ };
+}
+
+// this creates a fusion view: boost::fusion::adapted::point
+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))
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT((traits::is_view<adapted::point>));
+ ns::point basep(123, 456);
+ adapted::point p(basep);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<adapted::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<adapted::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 2);
+ ns::point basep(5, 3);
+ adapted::point v2(basep);
+
+ fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from ns::point to vector
+ ns::point basep(5, 3);
+ adapted::point p(basep);
+
+ fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from ns::point to list
+ ns::point basep(5, 3);
+ adapted::point p(basep);
+
+ fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((mpl::is_sequence<adapted::point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ fusion::result_of::value_at_c<adapted::point,0>::type
+ , mpl::front<adapted::point>::type>));
+ }
+
+ return boost::report_errors();
+}
+

Added: trunk/libs/fusion/test/sequence/adapt_assoc_adt.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_assoc_adt.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,136 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence.hpp>
+#include <boost/fusion/support.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ struct x_member;
+ struct y_member;
+ struct z_member;
+
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(int in_x, int in_y) : x(in_x), y(in_y) {}
+
+ int get_x() const { return x; }
+ int get_y() const { return y; }
+ void set_x(int x_) { x = x_; }
+ void set_y(int y_) { y = y_; }
+
+ private:
+
+ int x;
+ int y;
+ };
+}
+
+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)
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
+ ns::point p(123, 456);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ boost::fusion::vector<int, float> v1(4, 2);
+ ns::point v2(5, 3);
+ boost::fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from ns::point to vector
+ ns::point p(5, 3);
+ boost::fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from ns::point to list
+ ns::point p(5, 3);
+ boost::fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((boost::mpl::is_sequence<ns::point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ boost::fusion::result_of::value_at_c<ns::point,0>::type
+ , boost::mpl::front<ns::point>::type>));
+ }
+
+ {
+ // assoc stuff
+ BOOST_MPL_ASSERT((result_of::has_key<ns::point, ns::x_member>));
+ BOOST_MPL_ASSERT((result_of::has_key<ns::point, ns::y_member>));
+ BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<ns::point, ns::z_member> >));
+
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<ns::point, ns::x_member>::type, int>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<ns::point, ns::y_member>::type, int>));
+
+ ns::point p(5, 3);
+
+ BOOST_TEST(at_key<ns::x_member>(p) == 5);
+ BOOST_TEST(at_key<ns::y_member>(p) == 3);
+ }
+
+ return boost::report_errors();
+}
+

Added: trunk/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_assoc_adt_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,142 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence.hpp>
+#include <boost/fusion/support.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/adt/adapt_assoc_adt_named.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ struct x_member;
+ struct y_member;
+ struct z_member;
+
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(int in_x, int in_y) : x(in_x), y(in_y) {}
+
+ int get_x() const { return x; }
+ int get_y() const { return y; }
+ void set_x(int x_) { x = x_; }
+ void set_y(int y_) { y = y_; }
+
+ private:
+
+ int x;
+ int y;
+ };
+}
+
+BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED(
+ ns::point,
+ point,
+ (int, int, obj.obj.get_x(), obj.obj.set_x(val), ns::x_member)
+ (int, int, obj.obj.get_y(), obj.obj.set_y(val), ns::y_member)
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT((traits::is_view<adapted::point>));
+ ns::point basep(123, 456);
+ adapted::point p(basep);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<adapted::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<adapted::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ boost::fusion::vector<int, float> v1(4, 2);
+ ns::point basev2(5, 3);
+ adapted::point v2(basev2);
+ boost::fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from adapted::point to vector
+ ns::point basep(5, 3);
+ adapted::point p(basep);
+ boost::fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from adated::point to list
+ ns::point basep(5, 3);
+ adapted::point p(basep);
+ boost::fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((boost::mpl::is_sequence<adapted::point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ boost::fusion::result_of::value_at_c<adapted::point,0>::type
+ , boost::mpl::front<adapted::point>::type>));
+ }
+
+ {
+ // assoc stuff
+ BOOST_MPL_ASSERT((result_of::has_key<adapted::point, ns::x_member>));
+ BOOST_MPL_ASSERT((result_of::has_key<adapted::point, ns::y_member>));
+ BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<adapted::point, ns::z_member> >));
+
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<adapted::point, ns::x_member>::type, int>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<adapted::point, ns::y_member>::type, int>));
+
+ ns::point basep(5, 3);
+ adapted::point p(basep);
+
+ BOOST_TEST(at_key<ns::x_member>(p) == 5);
+ BOOST_TEST(at_key<ns::y_member>(p) == 3);
+ }
+
+ return boost::report_errors();
+}
+

Deleted: trunk/libs/fusion/test/sequence/adapt_assoc_class.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_assoc_class.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,136 +0,0 @@
-/*=============================================================================
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/sequence.hpp>
-#include <boost/fusion/support.hpp>
-#include <boost/fusion/container/list.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/static_assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- struct x_member;
- struct y_member;
- struct z_member;
-
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(int in_x, int in_y) : x(in_x), y(in_y) {}
-
- int get_x() const { return x; }
- int get_y() const { return y; }
- void set_x(int x_) { x = x_; }
- void set_y(int y_) { y = y_; }
-
- private:
-
- int x;
- int y;
- };
-}
-
-BOOST_FUSION_ADAPT_ASSOC_CLASS(
- 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)
-)
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace std;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
- ns::point p(123, 456);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- boost::fusion::vector<int, float> v1(4, 2);
- ns::point v2(5, 3);
- boost::fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from ns::point to vector
- ns::point p(5, 3);
- boost::fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from ns::point to list
- ns::point p(5, 3);
- boost::fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((boost::mpl::is_sequence<ns::point>));
- BOOST_MPL_ASSERT((boost::is_same<
- boost::fusion::result_of::value_at_c<ns::point,0>::type
- , boost::mpl::front<ns::point>::type>));
- }
-
- {
- // assoc stuff
- BOOST_MPL_ASSERT((result_of::has_key<ns::point, ns::x_member>));
- BOOST_MPL_ASSERT((result_of::has_key<ns::point, ns::y_member>));
- BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<ns::point, ns::z_member> >));
-
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<ns::point, ns::x_member>::type, int>));
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<ns::point, ns::y_member>::type, int>));
-
- ns::point p(5, 3);
-
- BOOST_TEST(at_key<ns::x_member>(p) == 5);
- BOOST_TEST(at_key<ns::y_member>(p) == 3);
- }
-
- return boost::report_errors();
-}
-

Deleted: trunk/libs/fusion/test/sequence/adapt_assoc_class_named.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_assoc_class_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,142 +0,0 @@
-/*=============================================================================
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/sequence.hpp>
-#include <boost/fusion/support.hpp>
-#include <boost/fusion/container/list.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/adapted/class/adapt_assoc_class_named.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/static_assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- struct x_member;
- struct y_member;
- struct z_member;
-
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(int in_x, int in_y) : x(in_x), y(in_y) {}
-
- int get_x() const { return x; }
- int get_y() const { return y; }
- void set_x(int x_) { x = x_; }
- void set_y(int y_) { y = y_; }
-
- private:
-
- int x;
- int y;
- };
-}
-
-BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED(
- ns::point,
- point,
- (int, int, obj.obj.get_x(), obj.obj.set_x(val), ns::x_member)
- (int, int, obj.obj.get_y(), obj.obj.set_y(val), ns::y_member)
-)
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace std;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT((traits::is_view<adapted::point>));
- ns::point basep(123, 456);
- adapted::point p(basep);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<adapted::point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<adapted::point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- boost::fusion::vector<int, float> v1(4, 2);
- ns::point basev2(5, 3);
- adapted::point v2(basev2);
- boost::fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from adapted::point to vector
- ns::point basep(5, 3);
- adapted::point p(basep);
- boost::fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from adated::point to list
- ns::point basep(5, 3);
- adapted::point p(basep);
- boost::fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((boost::mpl::is_sequence<adapted::point>));
- BOOST_MPL_ASSERT((boost::is_same<
- boost::fusion::result_of::value_at_c<adapted::point,0>::type
- , boost::mpl::front<adapted::point>::type>));
- }
-
- {
- // assoc stuff
- BOOST_MPL_ASSERT((result_of::has_key<adapted::point, ns::x_member>));
- BOOST_MPL_ASSERT((result_of::has_key<adapted::point, ns::y_member>));
- BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<adapted::point, ns::z_member> >));
-
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<adapted::point, ns::x_member>::type, int>));
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<adapted::point, ns::y_member>::type, int>));
-
- ns::point basep(5, 3);
- adapted::point p(basep);
-
- BOOST_TEST(at_key<ns::x_member>(p) == 5);
- BOOST_TEST(at_key<ns::y_member>(p) == 3);
- }
-
- return boost::report_errors();
-}
-

Added: trunk/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_assoc_tpl_adt.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,140 @@
+/*=============================================================================
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence.hpp>
+#include <boost/fusion/support.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ struct x_member;
+ struct y_member;
+ struct z_member;
+
+ template<typename X, typename Y>
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(X in_x, Y in_y) : x(in_x), y(in_y) {}
+
+ X get_x() const { return x; }
+ Y get_y() const { return y; }
+ void set_x(X x_) { x = x_; }
+ void set_y(Y y_) { y = y_; }
+
+ private:
+
+ X x;
+ Y y;
+ };
+}
+
+BOOST_FUSION_ADAPT_ASSOC_TPL_ADT(
+ (X)(Y),
+ (ns::point)(X)(Y),
+ (X, X, obj.get_x(), obj.set_x(val), ns::x_member)
+ (Y, Y, obj.get_y(), obj.set_y(val), ns::y_member)
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace std;
+
+ typedef ns::point<int,int> point;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<point>));
+ point p(123, 456);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ boost::fusion::vector<int, float> v1(4, 2);
+ point v2(5, 3);
+ boost::fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from point to vector
+ point p(5, 3);
+ boost::fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from point to list
+ point p(5, 3);
+ boost::fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ boost::fusion::result_of::value_at_c<point,0>::type
+ , boost::mpl::front<point>::type>));
+ }
+
+ {
+ // assoc stuff
+ BOOST_MPL_ASSERT((result_of::has_key<point, ns::x_member>));
+ BOOST_MPL_ASSERT((result_of::has_key<point, ns::y_member>));
+ BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<point, ns::z_member> >));
+
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<point, ns::x_member>::type, int>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<point, ns::y_member>::type, int>));
+
+ point p(5, 3);
+
+ BOOST_TEST(at_key<ns::x_member>(p) == 5);
+ BOOST_TEST(at_key<ns::y_member>(p) == 3);
+ }
+
+ return boost::report_errors();
+}
+

Deleted: trunk/libs/fusion/test/sequence/adapt_assoc_tpl_class.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_assoc_tpl_class.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,140 +0,0 @@
-/*=============================================================================
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/sequence.hpp>
-#include <boost/fusion/support.hpp>
-#include <boost/fusion/container/list.hpp>
-#include <boost/fusion/container/vector.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/static_assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- struct x_member;
- struct y_member;
- struct z_member;
-
- template<typename X, typename Y>
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(X in_x, Y in_y) : x(in_x), y(in_y) {}
-
- X get_x() const { return x; }
- Y get_y() const { return y; }
- void set_x(X x_) { x = x_; }
- void set_y(Y y_) { y = y_; }
-
- private:
-
- X x;
- Y y;
- };
-}
-
-BOOST_FUSION_ADAPT_ASSOC_TPL_CLASS(
- (X)(Y),
- (ns::point)(X)(Y),
- (X, X, obj.get_x(), obj.set_x(val), ns::x_member)
- (Y, Y, obj.get_y(), obj.set_y(val), ns::y_member)
-)
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace std;
-
- typedef ns::point<int,int> point;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT_NOT((traits::is_view<point>));
- point p(123, 456);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- boost::fusion::vector<int, float> v1(4, 2);
- point v2(5, 3);
- boost::fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from point to vector
- point p(5, 3);
- boost::fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from point to list
- point p(5, 3);
- boost::fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>));
- BOOST_MPL_ASSERT((boost::is_same<
- boost::fusion::result_of::value_at_c<point,0>::type
- , boost::mpl::front<point>::type>));
- }
-
- {
- // assoc stuff
- BOOST_MPL_ASSERT((result_of::has_key<point, ns::x_member>));
- BOOST_MPL_ASSERT((result_of::has_key<point, ns::y_member>));
- BOOST_MPL_ASSERT((boost::mpl::not_<result_of::has_key<point, ns::z_member> >));
-
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<point, ns::x_member>::type, int>));
- BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<point, ns::y_member>::type, int>));
-
- point p(5, 3);
-
- BOOST_TEST(at_key<ns::x_member>(p) == 5);
- BOOST_TEST(at_key<ns::y_member>(p) == 3);
- }
-
- return boost::report_errors();
-}
-

Deleted: trunk/libs/fusion/test/sequence/adapt_class.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_class.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,179 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
-
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/adapted/class/adapt_class.hpp>
-#include <boost/fusion/sequence/intrinsic/at.hpp>
-#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/intrinsic/empty.hpp>
-#include <boost/fusion/sequence/intrinsic/front.hpp>
-#include <boost/fusion/sequence/intrinsic/back.hpp>
-#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-#include <boost/fusion/sequence/io/out.hpp>
-#include <boost/fusion/container/vector/vector.hpp>
-#include <boost/fusion/container/list/list.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/container/vector/convert.hpp>
-#include <boost/fusion/sequence/comparison/equal_to.hpp>
-#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
-#include <boost/fusion/sequence/comparison/less.hpp>
-#include <boost/fusion/sequence/comparison/less_equal.hpp>
-#include <boost/fusion/sequence/comparison/greater.hpp>
-#include <boost/fusion/sequence/comparison/greater_equal.hpp>
-#include <boost/fusion/mpl.hpp>
-#include <boost/fusion/support/is_view.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/mpl/assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(int in_x, int in_y) : x(in_x), y(in_y) {}
-
- int get_x() const { return x; }
- int get_y() const { return y; }
- void set_x(int x_) { x = x_; }
- void set_y(int y_) { y = y_; }
-
- private:
-
- int x;
- int y;
- };
-
-#if !BOOST_WORKAROUND(__GNUC__,<4)
- class point_with_private_members
- {
- friend struct boost::fusion::extension::access;
-
- public:
- point_with_private_members() : x(0), y(0) {}
- point_with_private_members(int x, int y) : x(x), y(y) {}
-
- private:
- int get_x() const { return x; }
- int get_y() const { return y; }
- void set_x(int x_) { x = x_; }
- void set_y(int y_) { y = y_; }
-
- int x;
- int y;
- };
-#endif
-}
-
-BOOST_FUSION_ADAPT_CLASS(
- 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(
- ns::point_with_private_members,
- (int, int, obj.get_x(), obj.set_x(val))
- (int, int, obj.get_y(), obj.set_y(val))
-)
-#endif
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace boost;
- using namespace std;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
- ns::point p(123, 456);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- fusion::vector<int, float> v1(4, 2);
- ns::point v2(5, 3);
- fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from ns::point to vector
- ns::point p(5, 3);
- fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from ns::point to list
- ns::point p(5, 3);
- fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((mpl::is_sequence<ns::point>));
- BOOST_MPL_ASSERT((boost::is_same<
- fusion::result_of::value_at_c<ns::point,0>::type
- , mpl::front<ns::point>::type>));
- }
-
-#if !BOOST_WORKAROUND(__GNUC__,<4)
- {
- BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point_with_private_members>));
- ns::point_with_private_members p(123, 456);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<ns::point_with_private_members>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<ns::point_with_private_members>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-#endif
-
- return boost::report_errors();
-}
-

Deleted: trunk/libs/fusion/test/sequence/adapt_class_named.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_class_named.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,137 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
-
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/adapted/class/adapt_class_named.hpp>
-#include <boost/fusion/sequence/intrinsic/at.hpp>
-#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/intrinsic/empty.hpp>
-#include <boost/fusion/sequence/intrinsic/front.hpp>
-#include <boost/fusion/sequence/intrinsic/back.hpp>
-#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-#include <boost/fusion/sequence/io/out.hpp>
-#include <boost/fusion/container/vector/vector.hpp>
-#include <boost/fusion/container/list/list.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/container/vector/convert.hpp>
-#include <boost/fusion/sequence/comparison/equal_to.hpp>
-#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
-#include <boost/fusion/sequence/comparison/less.hpp>
-#include <boost/fusion/sequence/comparison/less_equal.hpp>
-#include <boost/fusion/sequence/comparison/greater.hpp>
-#include <boost/fusion/sequence/comparison/greater_equal.hpp>
-#include <boost/fusion/mpl.hpp>
-#include <boost/fusion/support/is_view.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/mpl/assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(int in_x, int in_y) : x(in_x), y(in_y) {}
-
- int get_x() const { return x; }
- int get_y() const { return y; }
- void set_x(int x_) { x = x_; }
- void set_y(int y_) { y = y_; }
-
- private:
-
- int x;
- int y;
- };
-}
-
-// this creates a fusion view: boost::fusion::adapted::point
-BOOST_FUSION_ADAPT_CLASS_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))
-)
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace boost;
- using namespace std;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT((traits::is_view<adapted::point>));
- ns::point basep(123, 456);
- adapted::point p(basep);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<adapted::point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<adapted::point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- fusion::vector<int, float> v1(4, 2);
- ns::point basep(5, 3);
- adapted::point v2(basep);
-
- fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from ns::point to vector
- ns::point basep(5, 3);
- adapted::point p(basep);
-
- fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from ns::point to list
- ns::point basep(5, 3);
- adapted::point p(basep);
-
- fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((mpl::is_sequence<adapted::point>));
- BOOST_MPL_ASSERT((boost::is_same<
- fusion::result_of::value_at_c<adapted::point,0>::type
- , mpl::front<adapted::point>::type>));
- }
-
- return boost::report_errors();
-}
-

Added: trunk/libs/fusion/test/sequence/adapt_tpl_adt.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/fusion/test/sequence/adapt_tpl_adt.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -0,0 +1,133 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/adt/adapt_adt.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ template<typename X, typename Y>
+ class point
+ {
+ public:
+
+ point() : x(0), y(0) {}
+ point(X x_, Y y_) : x(x_), y(y_) {}
+
+ X get_x() const { return x; }
+ Y get_y() const { return y; }
+ void set_x(X x_) { x = x_; }
+ void set_y(Y y_) { y = y_; }
+
+ private:
+
+ X x;
+ Y y;
+ };
+}
+
+BOOST_FUSION_ADAPT_TPL_ADT(
+ (X)(Y),
+ (ns::point)(X)(Y),
+ (X, X, obj.get_x(), obj.set_x(val))
+ (Y, Y, obj.get_y(), obj.set_y(val))
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace std;
+
+ typedef ns::point<int, int> point;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<point>));
+ point p(123, 456);
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ boost::fusion::vector<int, float> v1(4, 2);
+ point v2(5, 3);
+ boost::fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from point to vector
+ point p(5, 3);
+ boost::fusion::vector<int, long> v(p);
+ v = p;
+ }
+
+ {
+ // conversion from point to list
+ point p(5, 3);
+ boost::fusion::list<int, long> l(p);
+ l = p;
+ }
+
+ {
+ BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>));
+ BOOST_MPL_ASSERT((boost::is_same<
+ boost::fusion::result_of::value_at_c<point,0>::type
+ , boost::mpl::front<point>::type>));
+ }
+
+ return boost::report_errors();
+}
+

Deleted: trunk/libs/fusion/test/sequence/adapt_tpl_class.cpp
==============================================================================
--- trunk/libs/fusion/test/sequence/adapt_tpl_class.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
+++ (empty file)
@@ -1,133 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
-
- 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)
-==============================================================================*/
-#include <boost/detail/lightweight_test.hpp>
-#include <boost/fusion/adapted/class/adapt_class.hpp>
-#include <boost/fusion/sequence/intrinsic/at.hpp>
-#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/sequence/intrinsic/empty.hpp>
-#include <boost/fusion/sequence/intrinsic/front.hpp>
-#include <boost/fusion/sequence/intrinsic/back.hpp>
-#include <boost/fusion/sequence/intrinsic/value_at.hpp>
-#include <boost/fusion/sequence/io/out.hpp>
-#include <boost/fusion/container/vector/vector.hpp>
-#include <boost/fusion/container/list/list.hpp>
-#include <boost/fusion/container/generation/make_vector.hpp>
-#include <boost/fusion/container/vector/convert.hpp>
-#include <boost/fusion/sequence/comparison/equal_to.hpp>
-#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
-#include <boost/fusion/sequence/comparison/less.hpp>
-#include <boost/fusion/sequence/comparison/less_equal.hpp>
-#include <boost/fusion/sequence/comparison/greater.hpp>
-#include <boost/fusion/sequence/comparison/greater_equal.hpp>
-#include <boost/fusion/mpl.hpp>
-#include <boost/fusion/support/is_view.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/is_sequence.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <iostream>
-#include <string>
-
-namespace ns
-{
- template<typename X, typename Y>
- class point
- {
- public:
-
- point() : x(0), y(0) {}
- point(X x_, Y y_) : x(x_), y(y_) {}
-
- X get_x() const { return x; }
- Y get_y() const { return y; }
- void set_x(X x_) { x = x_; }
- void set_y(Y y_) { y = y_; }
-
- private:
-
- X x;
- Y y;
- };
-}
-
-BOOST_FUSION_ADAPT_TPL_CLASS(
- (X)(Y),
- (ns::point)(X)(Y),
- (X, X, obj.get_x(), obj.set_x(val))
- (Y, Y, obj.get_y(), obj.set_y(val))
-)
-
-int
-main()
-{
- using namespace boost::fusion;
- using namespace std;
-
- typedef ns::point<int, int> point;
-
- std::cout << tuple_open('[');
- std::cout << tuple_close(']');
- std::cout << tuple_delimiter(", ");
-
- {
- BOOST_MPL_ASSERT_NOT((traits::is_view<point>));
- point p(123, 456);
-
- std::cout << at_c<0>(p) << std::endl;
- std::cout << at_c<1>(p) << std::endl;
- std::cout << p << std::endl;
- BOOST_TEST(p == make_vector(123, 456));
-
- at_c<0>(p) = 6;
- at_c<1>(p) = 9;
- BOOST_TEST(p == make_vector(6, 9));
-
- BOOST_STATIC_ASSERT(result_of::size<point>::value == 2);
- BOOST_STATIC_ASSERT(!result_of::empty<point>::value);
-
- BOOST_TEST(front(p) == 6);
- BOOST_TEST(back(p) == 9);
- }
-
- {
- boost::fusion::vector<int, float> v1(4, 2);
- point v2(5, 3);
- boost::fusion::vector<long, double> v3(5, 4);
- BOOST_TEST(v1 < v2);
- BOOST_TEST(v1 <= v2);
- BOOST_TEST(v2 > v1);
- BOOST_TEST(v2 >= v1);
- BOOST_TEST(v2 < v3);
- BOOST_TEST(v2 <= v3);
- BOOST_TEST(v3 > v2);
- BOOST_TEST(v3 >= v2);
- }
-
- {
- // conversion from point to vector
- point p(5, 3);
- boost::fusion::vector<int, long> v(p);
- v = p;
- }
-
- {
- // conversion from point to list
- point p(5, 3);
- boost::fusion::list<int, long> l(p);
- l = p;
- }
-
- {
- BOOST_MPL_ASSERT((boost::mpl::is_sequence<point>));
- BOOST_MPL_ASSERT((boost::is_same<
- boost::fusion::result_of::value_at_c<point,0>::type
- , boost::mpl::front<point>::type>));
- }
-
- return boost::report_errors();
-}
-

Modified: trunk/libs/spirit/example/karma/complex_number_adapt.cpp
==============================================================================
--- trunk/libs/spirit/example/karma/complex_number_adapt.cpp (original)
+++ trunk/libs/spirit/example/karma/complex_number_adapt.cpp 2010-09-16 12:33:25 EDT (Thu, 16 Sep 2010)
@@ -21,7 +21,7 @@
 #include <boost/spirit/include/phoenix_core.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>
 #include <boost/fusion/include/std_pair.hpp>
-#include <boost/fusion/include/adapt_class.hpp>
+#include <boost/fusion/include/adapt_adt.hpp>
 
 #include <iostream>
 #include <string>
@@ -32,7 +32,7 @@
 // sequence.
 //[tutorial_karma_complex_number_adapt_class
 // We can leave off the setters as Karma does not need them.
-BOOST_FUSION_ADAPT_CLASS(
+BOOST_FUSION_ADAPT_ADT(
     std::complex<double>,
     (bool, bool, obj.imag() != 0, /**/)
     (double, double, obj.real(), /**/)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk