Subject: [Boost-bugs] [Boost C++ Libraries] #5616: No output when using a filtering_ostream pointer
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-06-16 18:35:32
#5616: No output when using a filtering_ostream pointer
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: turkanis
Type: Bugs | Status: new
Milestone: To Be Determined | Component: iostreams
Version: Boost 1.46.1 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
When creating a filtering_ostream on the heap, the output is empty.
Following code works:
{{{
boost::regex pattern("...");
boost::iostreams::regex_filter filter(pattern,"...");
boost::iostreams::filtering_ostream out;
out.push(filter);
out.push(std::cout);
out<<"I am written to std::cout"<<endl;
}}}
However, following code does not. Nothing is printed on the standard
output:
{{{
boost::regex pattern("...");
boost::iostreams::regex_filter filter(pattern,"...");
boost::iostreams::filtering_ostream &out = *new
boost::iostreams::filtering_ostream();
out.push(filter);
out.push(std::cout);
out<<"I am not written to std::cout!"<<endl;
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5616> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC