Opened 13 years ago

Closed 12 years ago

#4102 closed Bugs (fixed)

problem about reopening input stream

Reported by: lv.jcfly@… Owned by: Jonathan Turkanis
Milestone: Boost 1.43.0 Component: iostreams
Version: Boost 1.42.0 Severity: Problem
Keywords: Cc:

Description

	boost::iostreams::stream<boost::iostreams::array_source> is;
	char buf[100];

	is.open(buf, sizeof(buf));
	is.close();
	BOOST_ASSERT(! is.is_open());	// OK

	is.open(buf, sizeof(buf));
	is.close();			// the stream isn't closed correctly here

	BOOST_ASSERT(! is.is_open());	// failed. the stream is still open

	is.open(buf, sizeof(buf));	// throws an exception ("already open")

Change History (1)

comment:1 by Steven Watanabe, 12 years ago

Resolution: fixed
Status: newclosed

(In [63036]) Make sure that direct_streambuf and indirect_streambuf are reset correctly on open. Fixes #4102.

Note: See TracTickets for help on using tickets.