Function Template putback

Overview
Headers
Reference

Overview

The function template put provides a uniform interface for putting back characters read from models of Peekable, for use in the definitions of new Filter types.

Headers

<boost/iostreams/operations.hpp>

Reference

Description

Puts back a character to a given instance of the template parameter Peekable

Synopsis

namespace boost { namespace iostreams {
              
    template<typename Peekable>     
    void putback(Peekable& peekable, typename io_char<Peekable>::type c);

} } // End namespace boost::io

Template Parameters

Peekable- A model of Peekable or a standard input stream or stream buffer type.

Semantics

The semantics of putback depends on the category of Peekable as follows:

io_category<Peekable>::typesemantics
convertible to istream_tag invokes peekable.putback(c)
convertible to streambuf_tag but not to istream_tag invokes peekable.sputbackc(c)
convertible to peekable_tag but not to streambuf_tag or istream_tag invokes peekable.putback(c)
otherwise compile-time error