Modify

Opened 6 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;

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Jonathan Turkanis.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.