Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81918 - in branches/release: . boost boost/spirit boost/spirit/home boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2012-12-13 17:06:54


Author: hkaiser
Date: 2012-12-13 17:06:53 EST (Thu, 13 Dec 2012)
New Revision: 81918
URL: http://svn.boost.org/trac/boost/changeset/81918

Log:
Spirit: merging from trunk
Properties modified:
   branches/release/ (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (contents, props changed)
Text files modified:
   branches/release/boost/spirit/home/support/attributes.hpp | 16 ++++++++++++----
   1 files changed, 12 insertions(+), 4 deletions(-)

Modified: branches/release/boost/spirit/home/support/attributes.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/attributes.hpp (original)
+++ branches/release/boost/spirit/home/support/attributes.hpp 2012-12-13 17:06:53 EST (Thu, 13 Dec 2012)
@@ -524,11 +524,17 @@
     {
         struct attribute_size_visitor : static_visitor<>
         {
+ attribute_size_visitor(std::size_t& size)
+ :size_(size)
+ {}
+
             template <typename T>
- typename attribute_size<T>::type operator()(T const& val) const
+ void operator()(T const& val)
             {
- return spirit::traits::size(val);
+ size_ = spirit::traits::size(val);
             }
+
+ std::size_t& size_;
         };
     }
 
@@ -537,9 +543,11 @@
     {
         typedef std::size_t type;
 
- static void call(variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& val)
+ static type call(variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& val)
         {
- apply_visitor(detail::attribute_size_visitor(), val);
+ std::size_t size = 0;
+ apply_visitor(detail::attribute_size_visitor(size), val);
+ return size;
         }
     };
 


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