Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74589 - in trunk/boost/fusion/adapted/std_tuple: . detail
From: joel_at_[hidden]
Date: 2011-09-27 07:45:24


Author: djowel
Date: 2011-09-27 07:45:24 EDT (Tue, 27 Sep 2011)
New Revision: 74589
URL: http://svn.boost.org/trac/boost/changeset/74589

Log:
fix for case where Sequence is const
Text files modified:
   trunk/boost/fusion/adapted/std_tuple/detail/size_impl.hpp | 7 ++++++-
   trunk/boost/fusion/adapted/std_tuple/tag_of.hpp | 2 +-
   2 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/boost/fusion/adapted/std_tuple/detail/size_impl.hpp
==============================================================================
--- trunk/boost/fusion/adapted/std_tuple/detail/size_impl.hpp (original)
+++ trunk/boost/fusion/adapted/std_tuple/detail/size_impl.hpp 2011-09-27 07:45:24 EDT (Tue, 27 Sep 2011)
@@ -9,6 +9,7 @@
 
 #include <tuple>
 #include <boost/mpl/int.hpp>
+#include <boost/type_traits/remove_const.hpp>
 
 namespace boost { namespace fusion
 {
@@ -23,7 +24,11 @@
         struct size_impl<std_tuple_tag>
         {
             template <typename Sequence>
- struct apply : mpl::int_<std::tuple_size<Sequence>::value> {};
+ struct apply :
+ mpl::int_<std::tuple_size<
+ typename remove_const<Sequence>::type>::value
+ >
+ {};
         };
     }
 }}

Modified: trunk/boost/fusion/adapted/std_tuple/tag_of.hpp
==============================================================================
--- trunk/boost/fusion/adapted/std_tuple/tag_of.hpp (original)
+++ trunk/boost/fusion/adapted/std_tuple/tag_of.hpp 2011-09-27 07:45:24 EDT (Tue, 27 Sep 2011)
@@ -33,7 +33,7 @@
 
 namespace boost { namespace mpl
 {
- template<typename>
+ template <typename>
     struct sequence_tag;
 
     template <typename... Elements>


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