|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64206 - trunk/boost/optional
From: fernando.cacciola_at_[hidden]
Date: 2010-07-20 14:20:41
Author: fcacciola
Date: 2010-07-20 14:20:40 EDT (Tue, 20 Jul 2010)
New Revision: 64206
URL: http://svn.boost.org/trac/boost/changeset/64206
Log:
Fixed extraction operator for empty optionals
Text files modified:
trunk/boost/optional/optional_io.hpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
Modified: trunk/boost/optional/optional_io.hpp
==============================================================================
--- trunk/boost/optional/optional_io.hpp (original)
+++ trunk/boost/optional/optional_io.hpp 2010-07-20 14:20:40 EDT (Tue, 20 Jul 2010)
@@ -25,7 +25,7 @@
# include <ostream>
#endif
-
+#include <boost/assert.hpp>
#include "boost/optional/optional.hpp"
#include "boost/utility/value_init.hpp"
@@ -72,7 +72,12 @@
v = x ;
}
else
+ {
+ BOOST_ASSERT(d == '-');
+ d = in.get();
+ BOOST_ASSERT(d == '-');
v = optional<T>() ;
+ }
}
return in;
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