Update of /cvsroot/boost/boost/boost/fusion/sequence/adapted/struct
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22182

Modified Files:
        struct_iterator.hpp 
Added Files:
        extension.hpp 
Log Message:
updates

--- NEW FILE: extension.hpp ---
/*=============================================================================
    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 <boost/type_traits/add_const.hpp>

namespace boost { namespace fusion { namespace extension
{
    template <typename Struct, int N>
    struct struct_member;

    template <typename Struct>
    struct struct_size;

    template <typename Struct, int N>
    struct struct_member<Struct const, N>
    {
        typedef typename
            add_const<typename struct_member<Struct, N>::type>::type
        type;

        static type&
        call(Struct const& struct_)
        {
            return struct_member<Struct, N>::call(
                const_cast<Struct&>(struct_));
        }
    };

    template <typename Struct>
    struct struct_size<Struct const>
        : struct_size<Struct>
    {};
}}}

#endif



Index: struct_iterator.hpp
===================================================================
RCS file: 
/cvsroot/boost/boost/boost/fusion/sequence/adapted/struct/struct_iterator.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- struct_iterator.hpp 2 Apr 2007 03:31:12 -0000       1.1
+++ struct_iterator.hpp 2 Apr 2007 03:52:41 -0000       1.2
@@ -9,9 +9,9 @@
 #define FUSION_STRUCT_ITERATOR_APRIL_2_2007_1008AM
 
 #include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/sequence/adapted/struct/extension.hpp>
 #include <boost/type_traits/is_const.hpp>
 #include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_const.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/identity.hpp>
 #include <boost/mpl/if.hpp>
@@ -21,35 +21,6 @@
 
 namespace boost { namespace fusion
 {
-    namespace extension
-    {
-        template <typename Struct, int N>
-        struct struct_member;
-
-        template <typename Struct>
-        struct struct_size;
-
-        template <typename Struct, int N>
-        struct struct_member<Struct const, N>
-        {
-            typedef typename
-                add_const<typename struct_member<Struct, N>::type>::type
-            type;
-
-            static type&
-            call(Struct const& struct_)
-            {
-                return struct_member<Struct, N>::call(
-                    const_cast<Struct&>(struct_));
-            }
-        };
-
-        template <typename Struct>
-        struct struct_size<Struct const>
-            : struct_size<Struct>
-        {};
-    }
-
     struct random_access_traversal_tag;
 
     template <typename Struct, int N_>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to