Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55009 - trunk/boost/spirit/home/qi/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-07-17 23:36:49


Author: hkaiser
Date: 2009-07-17 23:36:48 EDT (Fri, 17 Jul 2009)
New Revision: 55009
URL: http://svn.boost.org/trac/boost/changeset/55009

Log:
Spirit: added proper initialization of attribute value
Text files modified:
   trunk/boost/spirit/home/qi/detail/pass_container.hpp | 5 ++++-
   1 files changed, 4 insertions(+), 1 deletions(-)

Modified: trunk/boost/spirit/home/qi/detail/pass_container.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/detail/pass_container.hpp (original)
+++ trunk/boost/spirit/home/qi/detail/pass_container.hpp 2009-07-17 23:36:48 EDT (Fri, 17 Jul 2009)
@@ -66,7 +66,10 @@
         template <typename Component>
         bool dispatch_attribute_element(Component const& component, mpl::false_) const
         {
- typename traits::result_of::value<Attr>::type val;
+ // synthesized attribute needs to be default constructed
+ typename traits::result_of::value<Attr>::type val =
+ typename traits::result_of::value<Attr>::type();
+
             bool r = f(component, val);
             if (!r)
             {


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