Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71627 - trunk/boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2011-04-30 11:44:37


Author: hkaiser
Date: 2011-04-30 11:44:36 EDT (Sat, 30 Apr 2011)
New Revision: 71627
URL: http://svn.boost.org/trac/boost/changeset/71627

Log:
Spirit: fixing regression tests failing for gcc
Text files modified:
   trunk/boost/spirit/home/support/attributes.hpp | 12 ++++++++++--
   1 files changed, 10 insertions(+), 2 deletions(-)

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2011-04-30 11:44:36 EDT (Sat, 30 Apr 2011)
@@ -468,8 +468,16 @@
 
     template <typename Attribute>
     struct attribute_size<optional<Attribute> >
- : attribute_size<Attribute>
- {};
+ {
+ typedef typename attribute_size<Attribute>::type type;
+
+ static type call(optional<Attribute> const& val)
+ {
+ if (!val)
+ return 0;
+ return val.get();
+ }
+ };
 
     template <typename Iterator>
     struct attribute_size<iterator_range<Iterator> >


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