A Peekable Device allows a character read from the input sequence to be putback.
The name of the concept is based on the observation that a PeekableDevice allow the user to peek at the first character in the sequence it controls by calling
read followed by
putback. The names Putbackable and InputRevertable were considered but rejected.
|A type which is a model of Peekable
|Object of type
|Object of type equal to the character type of
|Alias for namespace
One or more characters has been read from
io::read, with no intervening i/o operations having been performed
Attempts to put back
true for success
If putback returns
true, the next character read from
io::read will be equal to
Errors which occur during the execution of
putback are be indicated by throwing exceptions.
© Copyright 2008 CodeRage, LLC
© Copyright 2004-2007 Jonathan Turkanis
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)