Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56701 - trunk/boost/spirit/home/support
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-10 10:41:50


Author: hkaiser
Date: 2009-10-10 10:41:49 EDT (Sat, 10 Oct 2009)
New Revision: 56701
URL: http://svn.boost.org/trac/boost/changeset/56701

Log:
Spirit: fixing re-initialization problem for optional attributes
Text files modified:
   trunk/boost/spirit/home/support/attributes.hpp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2009-10-10 10:41:49 EDT (Sat, 10 Oct 2009)
@@ -644,8 +644,10 @@
     {
         static void call(optional<T>& val)
         {
- if (val)
+ if (val) {
                 clear(*val);
+ val = none_t(); // leave optional uninitialized
+ }
         }
     };
 


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