Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62142 - trunk/boost/spirit/home/qi/auxiliary
From: hartmut.kaiser_at_[hidden]
Date: 2010-05-22 10:25:11


Author: hkaiser
Date: 2010-05-22 10:25:08 EDT (Sat, 22 May 2010)
New Revision: 62142
URL: http://svn.boost.org/trac/boost/changeset/62142

Log:
Spirit: fixing const correctness problem
Text files modified:
   trunk/boost/spirit/home/qi/auxiliary/attr.hpp | 7 ++-----
   1 files changed, 2 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/qi/auxiliary/attr.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/auxiliary/attr.hpp (original)
+++ trunk/boost/spirit/home/qi/auxiliary/attr.hpp 2010-05-22 10:25:08 EDT (Sat, 22 May 2010)
@@ -20,6 +20,7 @@
 #include <boost/spirit/home/support/common_terminals.hpp>
 #include <boost/type_traits/add_reference.hpp>
 #include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
 
 namespace boost { namespace spirit
 {
@@ -45,10 +46,7 @@
     struct attr_parser : primitive_parser<attr_parser<Value> >
     {
         template <typename Context, typename Iterator>
- struct attribute
- {
- typedef Value type;
- };
+ struct attribute : remove_const<Value> {};
 
         attr_parser(typename add_reference<Value>::type value)
           : value_(value) {}
@@ -93,7 +91,6 @@
             return result_type(fusion::at_c<0>(term.args));
         }
     };
-
 }}}
 
 #endif


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