From 5423cde1f1137d7f546e81f733b7273135d01240 Mon Sep 17 00:00:00 2001 From: Joel de Guzman Date: Mon, 2 Apr 2007 03:52:41 +0000 Subject: [PATCH] updates [SVN r37329] --- .../sequence/adapted/struct/extension.hpp | 44 +++++++++++++++++++ .../adapted/struct/struct_iterator.hpp | 31 +------------ 2 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 include/boost/fusion/sequence/adapted/struct/extension.hpp diff --git a/include/boost/fusion/sequence/adapted/struct/extension.hpp b/include/boost/fusion/sequence/adapted/struct/extension.hpp new file mode 100644 index 00000000..f0af1baa --- /dev/null +++ b/include/boost/fusion/sequence/adapted/struct/extension.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + 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_STRUCT_EXTENSION_APRIL_2_2007_1008AM) +#define FUSION_STRUCT_EXTENSION_APRIL_2_2007_1008AM + +#include + +namespace boost { namespace fusion { namespace extension +{ + template + struct struct_member; + + template + struct struct_size; + + template + struct struct_member + { + typedef typename + add_const::type>::type + type; + + static type& + call(Struct const& struct_) + { + return struct_member::call( + const_cast(struct_)); + } + }; + + template + struct struct_size + : struct_size + {}; +}}} + +#endif + + diff --git a/include/boost/fusion/sequence/adapted/struct/struct_iterator.hpp b/include/boost/fusion/sequence/adapted/struct/struct_iterator.hpp index 0684deaf..b00251bb 100644 --- a/include/boost/fusion/sequence/adapted/struct/struct_iterator.hpp +++ b/include/boost/fusion/sequence/adapted/struct/struct_iterator.hpp @@ -9,9 +9,9 @@ #define FUSION_STRUCT_ITERATOR_APRIL_2_2007_1008AM #include +#include #include #include -#include #include #include #include @@ -21,35 +21,6 @@ namespace boost { namespace fusion { - namespace extension - { - template - struct struct_member; - - template - struct struct_size; - - template - struct struct_member - { - typedef typename - add_const::type>::type - type; - - static type& - call(Struct const& struct_) - { - return struct_member::call( - const_cast(struct_)); - } - }; - - template - struct struct_size - : struct_size - {}; - } - struct random_access_traversal_tag; template