|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73651 - trunk/boost/spirit/home/support/iterators/detail
From: hartmut.kaiser_at_[hidden]
Date: 2011-08-11 08:03:10
Author: hkaiser
Date: 2011-08-11 08:03:09 EDT (Thu, 11 Aug 2011)
New Revision: 73651
URL: http://svn.boost.org/trac/boost/changeset/73651
Log:
Spirit: make sure istream_policy checks for eof at construction time
Text files modified:
trunk/boost/spirit/home/support/iterators/detail/istream_policy.hpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/boost/spirit/home/support/iterators/detail/istream_policy.hpp
==============================================================================
--- trunk/boost/spirit/home/support/iterators/detail/istream_policy.hpp (original)
+++ trunk/boost/spirit/home/support/iterators/detail/istream_policy.hpp 2011-08-11 08:03:09 EDT (Thu, 11 Aug 2011)
@@ -90,7 +90,9 @@
explicit shared(T& input)
: input_(input), curtok_(-1)
, initialized_(false), eof_reached_(false)
- {}
+ {
+ peek_one(); // istreams may be at eof right in the beginning
+ }
void read_one()
{
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