Opened 11 years ago
#5616 new Bugs
No output when using a filtering_ostream pointer
| Reported by: | anonymous | Owned by: | Jonathan Turkanis |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | iostreams |
| Version: | Boost 1.46.1 | Severity: | Problem |
| Keywords: | Cc: |
Description
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;
Note:
See TracTickets
for help on using tickets.
