Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59913 - in trunk/boost/fusion: adapted/class adapted/class/detail adapted/struct adapted/struct/detail sequence/comparison/detail
From: mr.chr.schmidt_at_[hidden]
Date: 2010-02-25 15:10:44


Author: cschmidt
Date: 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
New Revision: 59913
URL: http://svn.boost.org/trac/boost/changeset/59913

Log:
better adapt structs/classes implementation
Removed:
   trunk/boost/fusion/adapted/class/detail/at_impl.hpp
   trunk/boost/fusion/adapted/class/detail/begin_impl.hpp
   trunk/boost/fusion/adapted/class/detail/category_of_impl.hpp
   trunk/boost/fusion/adapted/class/detail/deref_data_impl.hpp
   trunk/boost/fusion/adapted/class/detail/deref_impl.hpp
   trunk/boost/fusion/adapted/class/detail/end_impl.hpp
   trunk/boost/fusion/adapted/class/detail/is_sequence_impl.hpp
   trunk/boost/fusion/adapted/class/detail/is_view_impl.hpp
   trunk/boost/fusion/adapted/class/detail/key_of_impl.hpp
   trunk/boost/fusion/adapted/class/detail/size_impl.hpp
   trunk/boost/fusion/adapted/class/detail/value_at_impl.hpp
   trunk/boost/fusion/adapted/class/detail/value_of_data_impl.hpp
   trunk/boost/fusion/adapted/class/detail/value_of_impl.hpp
Text files modified:
   trunk/boost/fusion/adapted/class/adapt_assoc_class.hpp | 39 +++++++++------
   trunk/boost/fusion/adapted/class/adapt_class.hpp | 34 ++++++++-----
   trunk/boost/fusion/adapted/class/adapt_class_named.hpp | 2
   trunk/boost/fusion/adapted/class/detail/adapt_base.hpp | 96 ++++++++++++++++++++++++++-------------
   trunk/boost/fusion/adapted/class/detail/extension.hpp | 28 +++++++---
   trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp | 4 +
   trunk/boost/fusion/adapted/struct/adapt_struct.hpp | 4 +
   trunk/boost/fusion/adapted/struct/adapt_struct_named.hpp | 2
   trunk/boost/fusion/adapted/struct/detail/adapt_base.hpp | 70 +++++++++++++++++++++-------
   trunk/boost/fusion/adapted/struct/detail/at_impl.hpp | 36 +++-----------
   trunk/boost/fusion/adapted/struct/detail/begin_impl.hpp | 6 +-
   trunk/boost/fusion/adapted/struct/detail/category_of_impl.hpp | 4
   trunk/boost/fusion/adapted/struct/detail/deref_data_impl.hpp | 8 +-
   trunk/boost/fusion/adapted/struct/detail/deref_impl.hpp | 49 +++++++-------------
   trunk/boost/fusion/adapted/struct/detail/end_impl.hpp | 7 +-
   trunk/boost/fusion/adapted/struct/detail/extension.hpp | 8 ++-
   trunk/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp | 5 +
   trunk/boost/fusion/adapted/struct/detail/is_view_impl.hpp | 5 +
   trunk/boost/fusion/adapted/struct/detail/key_of_impl.hpp | 21 +++-----
   trunk/boost/fusion/adapted/struct/detail/proxy_type.hpp | 5 +
   trunk/boost/fusion/adapted/struct/detail/size_impl.hpp | 7 +-
   trunk/boost/fusion/adapted/struct/detail/value_at_impl.hpp | 7 +-
   trunk/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp | 8 +-
   trunk/boost/fusion/adapted/struct/detail/value_of_impl.hpp | 24 ++-------
   trunk/boost/fusion/sequence/comparison/detail/greater.hpp | 5 -
   trunk/boost/fusion/sequence/comparison/detail/less.hpp | 5 -
   26 files changed, 271 insertions(+), 218 deletions(-)

Modified: trunk/boost/fusion/adapted/class/adapt_assoc_class.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/adapt_assoc_class.hpp (original)
+++ trunk/boost/fusion/adapted/class/adapt_assoc_class.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,4 +1,6 @@
 /*=============================================================================
+ 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
@@ -11,22 +13,27 @@
 #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/class/detail/extension.hpp>
 #include <boost/fusion/adapted/class/detail/adapt_base.hpp>
-#include <boost/fusion/adapted/class/detail/at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/size_impl.hpp>
-#include <boost/fusion/adapted/class/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/class/detail/end_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/deref_impl.hpp>
-#include <boost/fusion/adapted/class/detail/deref_data_impl.hpp>
-#include <boost/fusion/adapted/class/detail/key_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_of_data_impl.hpp>
 
 #define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0(A, B, C, D, E)\
     ((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1
@@ -54,7 +61,7 @@
     BOOST_FUSION_ADAPT_STRUCT_BASE( \
         (1)TEMPLATE_PARAMS_SEQ, \
         (1)NAME_SEQ, \
- assoc_class_tag, \
+ assoc_struct_tag, \
         BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END), \
         BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
 
@@ -62,7 +69,7 @@
     BOOST_FUSION_ADAPT_STRUCT_BASE( \
         (0), \
         (0)(NAME), \
- assoc_class_tag, \
+ assoc_struct_tag, \
         BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END), \
         BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
 

Modified: trunk/boost/fusion/adapted/class/adapt_class.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/adapt_class.hpp (original)
+++ trunk/boost/fusion/adapted/class/adapt_class.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,4 +1,6 @@
 /*=============================================================================
+ 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
@@ -10,19 +12,25 @@
 
 #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/class/detail/extension.hpp>
 #include <boost/fusion/adapted/class/detail/adapt_base.hpp>
-#include <boost/fusion/adapted/class/detail/at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/size_impl.hpp>
-#include <boost/fusion/adapted/class/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/class/detail/end_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/deref_impl.hpp>
 
 #define BOOST_FUSION_ADAPT_CLASS_FILLER_0(A, B, C, D)\
     ((A, B, C, D)) BOOST_FUSION_ADAPT_CLASS_FILLER_1
@@ -39,7 +47,7 @@
     BOOST_FUSION_ADAPT_STRUCT_BASE( \
         (1)TEMPLATE_PARAMS_SEQ, \
         (1)NAME_SEQ, \
- class_tag, \
+ struct_tag, \
         BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END), \
         BOOST_FUSION_ADAPT_CLASS_C)
 
@@ -47,7 +55,7 @@
     BOOST_FUSION_ADAPT_STRUCT_BASE( \
         (0), \
         (0)(NAME), \
- class_tag, \
+ struct_tag, \
         BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END), \
         BOOST_FUSION_ADAPT_CLASS_C)
 

Modified: trunk/boost/fusion/adapted/class/adapt_class_named.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/adapt_class_named.hpp (original)
+++ trunk/boost/fusion/adapted/class/adapt_class_named.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,4 +1,6 @@
 /*=============================================================================
+ 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

Modified: trunk/boost/fusion/adapted/class/detail/adapt_base.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/adapt_base.hpp (original)
+++ trunk/boost/fusion/adapted/class/detail/adapt_base.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,14 +1,35 @@
 /*=============================================================================
+ 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_DETAIL_CLASS_ADAPT_BASE_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_ADAPT_BASE_HPP
+#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
 
-#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+//cschmidt: Spirit relies on Fusion defining class_member_proxy in the
+//boost::fusion::extension namespace, with two nested types named lvalue and
+//rvalue.
+
+#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ)\
+ typename detail::get_identity< \
+ lvalue \
+ , BOOST_PP_SEQ_ELEM(1,TEMPLATE_PARAMS_SEQ) \
+ >::type
+
+#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL( \
+ TEMPLATE_PARAMS_SEQ) \
+ \
+ lvalue
 
 #define BOOST_FUSION_ADAPT_CLASS_C_BASE(\
     TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
@@ -21,9 +42,8 @@
       , I \
> \
     { \
- typedef \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
- type; \
+ typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
+ typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) rvalue; \
                                                                                 \
         class_member_proxy(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj)\
           : obj(obj) \
@@ -31,13 +51,13 @@
                                                                                 \
         template<class Arg> \
         class_member_proxy& \
- operator=(Arg val) \
+ operator=(Arg const& val) \
         { \
             BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \
             return *this; \
         } \
                                                                                 \
- operator type() \
+ operator lvalue() \
         { \
             return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
         } \
@@ -50,34 +70,46 @@
> \
     struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
     { \
- typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \
- typedef \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
- get_type; \
- typedef \
- class_member_proxy< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
- , I \
- > \
- proxy; \
+ typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
                                                                                 \
- static get_type \
- call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \
- { \
- return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
- }; \
+ typedef \
+ BOOST_PP_IF( \
+ BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), \
+ BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL, \
+ BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL)( \
+ TEMPLATE_PARAMS_SEQ) \
+ type; \
                                                                                 \
- static proxy \
- call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \
+ template<typename Seq> \
+ struct apply \
         { \
- return proxy(obj); \
+ typedef \
+ class_member_proxy< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
+ , I \
+ > \
+ proxy; \
+ \
+ typedef typename \
+ mpl::if_< \
+ is_const<Seq> \
+ , BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
+ , proxy \
+ >::type \
+ type; \
+ \
+ static proxy \
+ call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \
+ { \
+ return proxy(obj); \
+ } \
+ \
+ static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \
+ call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \
+ { \
+ return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
+ } \
         }; \
     };
 
-namespace boost { namespace fusion { namespace extension
-{
- template <typename T, int N>
- struct class_member_proxy;
-}}}
-
 #endif

Deleted: trunk/boost/fusion/adapted/class/detail/at_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/at_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,55 +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_ADAPTED_DETAIL_CLASS_AT_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_AT_IMPL_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct at_impl;
-
- template <>
- struct at_impl<class_tag>
- {
- template<typename Seq, typename N>
- struct apply
- {
- typedef
- extension::struct_member<
- typename remove_const<Seq>::type
- , N::value
- >
- member;
-
- typedef typename
- mpl::if_<
- is_const<Seq>
- , typename member::get_type
- , typename member::proxy
- >::type
- type;
-
- static type
- call(Seq& seq)
- {
- return member::call(seq);
- }
- };
- };
-
- template <>
- struct at_impl<assoc_class_tag>
- : at_impl<class_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/begin_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/begin_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,65 +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_ADAPTED_DETAIL_CLASS_BEGIN_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_BEGIN_IMPL_HPP
-
-#include <boost/fusion/iterator/basic_iterator.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct begin_impl;
-
- template <>
- struct begin_impl<class_tag>
- {
- template <typename Seq>
- struct apply
- {
- typedef
- basic_iterator<
- class_iterator_tag
- , random_access_traversal_tag
- , Seq
- , 0
- >
- type;
-
- static type
- call(Seq& seq)
- {
- return type(seq,0);
- }
- };
- };
-
- template <>
- struct begin_impl<assoc_class_tag>
- {
- template <typename Seq>
- struct apply
- {
- typedef
- basic_iterator<
- assoc_class_iterator_tag
- , assoc_class_category
- , Seq
- , 0
- >
- type;
-
- static type
- call(Seq& seq)
- {
- return type(seq,0);
- }
- };
- };
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/category_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/category_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,32 +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_ADAPTED_DETAIL_CLASS_CATEGORY_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_CATEGORY_OF_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
-
-namespace boost { namespace fusion
-{
- namespace extension
- {
- template<typename>
- struct category_of_impl;
-
- template<>
- struct category_of_impl<class_tag>
- : category_of_impl<struct_tag>
- {};
-
- template<>
- struct category_of_impl<assoc_class_tag>
- : category_of_impl<assoc_struct_tag>
- {};
- }
-}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/deref_data_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/deref_data_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,22 +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_ADAPTED_DETAIL_CLASS_DEREF_DATA_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_DEREF_DATA_IMPL_HPP
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct deref_data_impl;
-
- template <>
- struct deref_data_impl<assoc_class_iterator_tag>
- : deref_impl<assoc_class_iterator_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/deref_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/deref_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,55 +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_ADAPTED_DETAIL_CLASS_DEREF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_DEREF_IMPL_HPP
-
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct deref_impl;
-
- template <>
- struct deref_impl<class_iterator_tag>
- {
- template <typename It>
- struct apply
- {
- typedef
- extension::struct_member<
- typename remove_const<typename It::seq_type>::type
- , It::index::value
- >
- member;
-
- typedef typename
- mpl::if_<
- is_const<typename It::seq_type>
- , typename member::get_type
- , typename member::proxy
- >::type
- type;
-
- static type
- call(It const& it)
- {
- return member::call(*it.seq);
- }
- };
- };
-
- template <>
- struct deref_impl<assoc_class_iterator_tag>
- : deref_impl<class_iterator_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/end_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/end_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,66 +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_ADAPTED_DETAIL_CLASS_END_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_END_IMPL_HPP
-
-#include <boost/fusion/iterator/basic_iterator.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct end_impl;
-
- template <>
- struct end_impl<class_tag>
- {
- template <typename Seq>
- struct apply
- {
- typedef
- basic_iterator<
- class_iterator_tag
- , random_access_traversal_tag
- , Seq
- , struct_size<typename remove_const<Seq>::type>::value
- >
- type;
-
- static type
- call(Seq& seq)
- {
- return type(seq,0);
- }
- };
- };
-
- template <>
- struct end_impl<assoc_class_tag>
- {
- template <typename Seq>
- struct apply
- {
- typedef
- basic_iterator<
- assoc_class_iterator_tag
- , assoc_class_category
- , Seq
- , struct_size<typename remove_const<Seq>::type>::value
- >
- type;
-
- static type
- call(Seq& seq)
- {
- return type(seq,0);
- }
- };
- };
-}}}
-
-#endif

Modified: trunk/boost/fusion/adapted/class/detail/extension.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/extension.hpp (original)
+++ trunk/boost/fusion/adapted/class/detail/extension.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,23 +1,33 @@
 /*=============================================================================
+ 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_DETAIL_CLASS_EXTENSION_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_EXTENSION_HPP
+#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
 
-#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
 
 namespace boost { namespace fusion
 {
- struct class_tag;
- struct class_iterator_tag;
- struct assoc_class_tag;
- struct assoc_class_iterator_tag;
-
- typedef assoc_struct_category assoc_class_category;
+ namespace detail
+ {
+ template <typename T, typename Dummy>
+ struct get_identity
+ : remove_const<typename remove_reference<T>::type>
+ {};
+ }
+
+ namespace extension
+ {
+ template <typename T, int N>
+ struct class_member_proxy;
+ }
 }}
 
 #endif

Deleted: trunk/boost/fusion/adapted/class/detail/is_sequence_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/is_sequence_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,29 +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_ADAPTED_DETAIL_CLASS_IS_SEQUENCE_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_IS_SEQUENCE_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct is_sequence_impl;
-
- template<>
- struct is_sequence_impl<class_tag>
- : is_sequence_impl<struct_tag>
- {};
-
- template <>
- struct is_sequence_impl<assoc_class_tag>
- : is_sequence_impl<assoc_struct_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/is_view_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/is_view_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,29 +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_ADAPTED_DETAIL_CLASS_IS_VIEW_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_IS_VIEW_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct is_view_impl;
-
- template<>
- struct is_view_impl<class_tag>
- : is_view_impl<struct_tag>
- {};
-
- template <>
- struct is_view_impl<assoc_class_tag>
- : is_view_impl<assoc_struct_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/key_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/key_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,24 +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_ADAPTED_DETAIL_CLASS_KEY_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_KEY_OF_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/key_of_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct key_of_impl;
-
- template <>
- struct key_of_impl<assoc_class_iterator_tag>
- : key_of_impl<assoc_struct_iterator_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/size_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/size_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,29 +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_ADAPTED_DETAIL_CLASS_SIZE_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_SIZE_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct size_impl;
-
- template <>
- struct size_impl<class_tag>
- : size_impl<struct_tag>
- {};
-
- template <>
- struct size_impl<assoc_class_tag>
- : size_impl<assoc_struct_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/value_at_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/value_at_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,29 +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_ADAPTED_DETAIL_CLASS_VALUE_AT_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_VALUE_AT_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template<typename>
- struct value_at_impl;
-
- template <>
- struct value_at_impl<class_tag>
- : value_at_impl<struct_tag>
- {};
-
- template <>
- struct value_at_impl<assoc_class_tag>
- : value_at_impl<assoc_struct_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/value_of_data_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/value_of_data_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,24 +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_ADAPTED_DETAIL_CLASS_VALUE_OF_DATA_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_VALUE_OF_DATA_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct value_of_data_impl;
-
- template <>
- struct value_of_data_impl<assoc_class_iterator_tag>
- : value_of_data_impl<assoc_struct_iterator_tag>
- {};
-}}}
-
-#endif

Deleted: trunk/boost/fusion/adapted/class/detail/value_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/class/detail/value_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
+++ (empty file)
@@ -1,29 +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_ADAPTED_DETAIL_CLASS_VALUE_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_CLASS_VALUE_OF_IMPL_HPP
-
-#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
-
-namespace boost { namespace fusion { namespace extension
-{
- template <typename>
- struct value_of_impl;
-
- template <>
- struct value_of_impl<class_iterator_tag>
- : value_of_impl<struct_iterator_tag>
- {};
-
- template <>
- struct value_of_impl<assoc_class_iterator_tag>
- : value_of_impl<class_iterator_tag>
- {};
-}}}
-
-#endif

Modified: trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp (original)
+++ trunk/boost/fusion/adapted/struct/adapt_assoc_struct.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -13,6 +13,10 @@
 #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/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>

Modified: trunk/boost/fusion/adapted/struct/adapt_struct.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/adapt_struct.hpp (original)
+++ trunk/boost/fusion/adapted/struct/adapt_struct.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -11,6 +11,10 @@
 
 #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>

Modified: trunk/boost/fusion/adapted/struct/adapt_struct_named.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/adapt_struct_named.hpp (original)
+++ trunk/boost/fusion/adapted/struct/adapt_struct_named.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,4 +1,6 @@
 /*=============================================================================
+ Copyright (c) 2001-2007 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

Modified: trunk/boost/fusion/adapted/struct/detail/adapt_base.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/adapt_base.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/adapt_base.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,16 +1,20 @@
 /*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
     Copyright (c) 2009-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_DETAIL_STRUCT_ADAPT_BASE_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_BASE_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
 
 #include <boost/config.hpp>
 #include <boost/fusion/support/tag_of_fwd.hpp>
 
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/stringize.hpp>
 #include <boost/preprocessor/control/if.hpp>
 #include <boost/preprocessor/seq/size.hpp>
 #include <boost/preprocessor/seq/for_each.hpp>
@@ -20,11 +24,14 @@
 #include <boost/preprocessor/tuple/eat.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
 #include <boost/mpl/tag.hpp>
-#include <boost/type_traits/add_reference.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
 #include <boost/type_traits/add_const.hpp>
 
 #define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \
- BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))>
+ BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))> \
+ BOOST_PP_EMPTY()
+
 #define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(SEQ) \
     BOOST_PP_IF( \
         BOOST_PP_SEQ_HEAD(SEQ), \
@@ -47,7 +54,7 @@
 
 #ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
 # define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- MODIFIER, TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG) \
+ MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
                                                                                 \
     template< \
         BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
@@ -61,7 +68,7 @@
     };
 #else
 # define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- MODIFIER, TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG) \
+ MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
                                                                                 \
     template< \
         BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
@@ -90,19 +97,46 @@
         typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \
                                                                                 \
         template<typename Seq> \
- static typename add_reference<type>::type \
- call(Seq& seq) \
+ struct apply \
         { \
- return seq.PREFIX \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \
- } \
+ typedef typename \
+ add_reference< \
+ typename mpl::eval_if< \
+ is_const<Seq> \
+ , add_const<BOOST_PP_TUPLE_ELEM( \
+ ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
+ > \
+ , mpl::identity<BOOST_PP_TUPLE_ELEM( \
+ ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
+ > \
+ >::type \
+ >::type \
+ type; \
+ \
+ static type \
+ call(Seq& seq) \
+ { \
+ return seq.PREFIX \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \
+ } \
+ }; \
+ }; \
                                                                                 \
- template<typename Seq> \
- static typename add_reference<typename add_const<type>::type>::type \
- call(Seq const& seq) \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct struct_member_name< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
+ , I \
+ > \
+ { \
+ typedef char const* type; \
+ \
+ static type \
+ call() \
         { \
- return seq.PREFIX \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \
+ return BOOST_PP_STRINGIZE( \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)); \
         } \
     };
 
@@ -116,9 +150,9 @@
         namespace traits \
         { \
             BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- BOOST_PP_EMPTY(),TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG) \
+ BOOST_PP_EMPTY(), TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
             BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- const,TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG) \
+ const, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
         } \
                                                                                 \
         namespace extension \

Modified: trunk/boost/fusion/adapted/struct/detail/at_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/at_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/at_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -7,13 +7,10 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_AT_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_AT_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP
 
-#include <boost/fusion/support/detail/access.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/int.hpp>
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -25,28 +22,11 @@
     {
         template <typename Seq, typename N>
         struct apply
- {
- typedef
- extension::struct_member<
- typename remove_const<Seq>::type
- , N::value
- >
- member;
-
- typedef typename
- mpl::eval_if<
- is_const<Seq>
- , detail::cref_result<member>
- , detail::ref_result<member>
- >::type
- type;
-
- static type
- call(Seq& seq)
- {
- return member::call(seq);
- }
- };
+ : extension::struct_member<
+ typename remove_const<Seq>::type
+ , N::value
+ >::template apply<Seq>
+ {};
     };
 
     template <>

Modified: trunk/boost/fusion/adapted/struct/detail/begin_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/begin_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/begin_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -7,8 +7,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_BEGIN_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_BEGIN_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
 
 #include <boost/fusion/iterator/basic_iterator.hpp>
 
@@ -48,7 +48,7 @@
         {
             typedef
                 basic_iterator<
- assoc_struct_iterator_tag
+ struct_iterator_tag
                   , assoc_struct_category
                   , Seq
                   , 0

Modified: trunk/boost/fusion/adapted/struct/detail/category_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/category_of_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/category_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -7,8 +7,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_CATEGORY_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_CATEGORY_OF_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
 
 namespace boost { namespace fusion
 {

Modified: trunk/boost/fusion/adapted/struct/detail/deref_data_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/deref_data_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/deref_data_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -5,8 +5,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_DATA_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_DATA_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -14,8 +14,8 @@
     struct deref_data_impl;
 
     template <>
- struct deref_data_impl<assoc_struct_iterator_tag>
- : deref_impl<assoc_struct_iterator_tag>
+ struct deref_data_impl<struct_iterator_tag>
+ : deref_impl<struct_iterator_tag>
     {};
 }}}
 

Modified: trunk/boost/fusion/adapted/struct/detail/deref_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/deref_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/deref_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -5,13 +5,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_IMPL_HPP
-
-#include <boost/fusion/support/detail/access.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/is_const.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -24,33 +19,23 @@
         template <typename It>
         struct apply
         {
- typedef
- extension::struct_member<
- typename remove_const<typename It::seq_type>::type
- , It::index::value
- >
- member;
-
- typedef typename
- mpl::eval_if<
- is_const<typename It::seq_type>
- , detail::cref_result<member>
- , detail::ref_result<member>
- >::type
- type;
-
- static type
- call(It const& it)
- {
- return member::call(*it.seq);
- }
+ typedef typename
+ extension::struct_member<
+ typename remove_const<typename It::seq_type>::type
+ , It::index::value
+ >::template apply<typename It::seq_type>
+ impl;
+
+ typedef typename impl::type type;
+
+ static
+ type
+ call(It const& it)
+ {
+ return impl::call(*it.seq);
+ }
         };
     };
-
- template <>
- struct deref_impl<assoc_struct_iterator_tag>
- : deref_impl<struct_iterator_tag>
- {};
 }}}
 
 #endif

Modified: trunk/boost/fusion/adapted/struct/detail/end_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/end_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/end_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -7,11 +7,10 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP
 
 #include <boost/fusion/iterator/basic_iterator.hpp>
-#include <boost/type_traits/remove_const.hpp>
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -49,7 +48,7 @@
         {
             typedef
                 basic_iterator<
- assoc_struct_iterator_tag
+ struct_iterator_tag
                   , assoc_struct_category
                   , Seq
                   , struct_size<typename remove_const<Seq>::type>::value

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-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -7,8 +7,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_EXTENSION_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_EXTENSION_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP
 
 #include <boost/fusion/support/category_of.hpp>
 
@@ -17,7 +17,6 @@
     struct struct_tag;
     struct struct_iterator_tag;
     struct assoc_struct_tag;
- struct assoc_struct_iterator_tag;
     struct fusion_sequence_tag;
 
     struct assoc_struct_category
@@ -32,6 +31,9 @@
         struct struct_member;
 
         template<typename Seq, int N>
+ struct struct_member_name;
+
+ template<typename Seq, int N>
         struct struct_assoc_key;
 
         template<typename Seq>

Modified: trunk/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,13 +1,14 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+ Copyright (c) 2009-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_DETAIL_STRUCT_IS_SEQUENCE_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_IS_SEQUENCE_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP
 
 #include <boost/mpl/bool.hpp>
 

Modified: trunk/boost/fusion/adapted/struct/detail/is_view_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/is_view_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/is_view_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,13 +1,14 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+ Copyright (c) 2009-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_DETAIL_STRUCT_IS_VIEW_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_IS_VIEW_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
 
 #include <boost/mpl/bool.hpp>
 

Modified: trunk/boost/fusion/adapted/struct/detail/key_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/key_of_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/key_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -5,10 +5,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_KEY_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_KEY_OF_IMPL_HPP
-
-#include <boost/type_traits/remove_const.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -16,18 +14,15 @@
     struct key_of_impl;
 
     template <>
- struct key_of_impl<assoc_struct_iterator_tag>
+ struct key_of_impl<struct_iterator_tag>
     {
         template <typename It>
         struct apply
- {
- typedef typename
- extension::struct_assoc_key<
- typename remove_const<typename It::seq_type>::type
- , It::index::value
- >::type
- type;
- };
+ : extension::struct_assoc_key<
+ typename remove_const<typename It::seq_type>::type
+ , It::index::value
+ >
+ {};
     };
 }}}
 

Modified: trunk/boost/fusion/adapted/struct/detail/proxy_type.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/proxy_type.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/proxy_type.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,12 +1,13 @@
 /*=============================================================================
+ 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_DETAIL_STRUCT_PROXY_TYPE_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_PROXY_TYPE_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PROXY_TYPE_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PROXY_TYPE_HPP
 
 #include <boost/preprocessor/dec.hpp>
 #include <boost/preprocessor/control/if.hpp>

Modified: trunk/boost/fusion/adapted/struct/detail/size_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/size_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/size_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,15 +1,14 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+ Copyright (c) 2009-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_DETAIL_STRUCT_SIZE_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_SIZE_IMPL_HPP
-
-#include <boost/type_traits/remove_const.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {

Modified: trunk/boost/fusion/adapted/struct/detail/value_at_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/value_at_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/value_at_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -1,15 +1,14 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+ Copyright (c) 2009-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_DETAIL_STRUCT_VALUE_AT_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_AT_IMPL_HPP
-
-#include <boost/type_traits/remove_const.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {

Modified: trunk/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -5,8 +5,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_DATA_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_DATA_IMPL_HPP
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -14,8 +14,8 @@
     struct value_of_data_impl;
 
     template <>
- struct value_of_data_impl<assoc_struct_iterator_tag>
- : value_of_impl<assoc_struct_iterator_tag>
+ struct value_of_data_impl<struct_iterator_tag>
+ : value_of_impl<struct_iterator_tag>
     {};
 }}}
 

Modified: trunk/boost/fusion/adapted/struct/detail/value_of_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/struct/detail/value_of_impl.hpp (original)
+++ trunk/boost/fusion/adapted/struct/detail/value_of_impl.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -5,10 +5,8 @@
     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 ==============================================================================*/
 
-#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_IMPL_HPP
-#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_IMPL_HPP
-
-#include <boost/type_traits/remove_const.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP
 
 namespace boost { namespace fusion { namespace extension
 {
@@ -20,20 +18,12 @@
     {
         template <typename It>
         struct apply
- {
- typedef typename
- extension::struct_member<
- typename remove_const<typename It::seq_type>::type
- , It::index::value
- >::type
- type;
- };
+ : extension::struct_member<
+ typename remove_const<typename It::seq_type>::type
+ , It::index::value
+ >
+ {};
     };
-
- template <>
- struct value_of_impl<assoc_struct_iterator_tag>
- : value_of_impl<struct_iterator_tag>
- {};
 }}}
 
 #endif

Modified: trunk/boost/fusion/sequence/comparison/detail/greater.hpp
==============================================================================
--- trunk/boost/fusion/sequence/comparison/detail/greater.hpp (original)
+++ trunk/boost/fusion/sequence/comparison/detail/greater.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -32,9 +32,8 @@
         static bool
         call(I1 const& a, I2 const& b, mpl::false_)
         {
- return *a > *b
- || !(*b > *a)
- && call(fusion::next(a), fusion::next(b));
+ return *a > *b ||
+ (!(*b > *a) && call(fusion::next(a), fusion::next(b)));
         }
 
         template <typename I1, typename I2>

Modified: trunk/boost/fusion/sequence/comparison/detail/less.hpp
==============================================================================
--- trunk/boost/fusion/sequence/comparison/detail/less.hpp (original)
+++ trunk/boost/fusion/sequence/comparison/detail/less.hpp 2010-02-25 15:10:37 EST (Thu, 25 Feb 2010)
@@ -32,9 +32,8 @@
         static bool
         call(I1 const& a, I2 const& b, mpl::false_)
         {
- return *a < *b
- || !(*b < *a)
- && call(fusion::next(a), fusion::next(b));
+ return *a < *b ||
+ (!(*b < *a) && call(fusion::next(a), fusion::next(b)));
         }
 
         template <typename I1, typename I2>


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