I'm wondering if I need an RAII wrapper around std::fstream....
views:
53answers:
1
+6
A:
No you don't. It closes the file. § 27.8.1.2:
virtual ˜basic_filebuf();
Effects: Destroys an object of class basic_filebuf. Calls close().
(which is contained as an object within std::fstream (§ 27.8.1.11), thus being destructed when the fstream is destructed).
Johannes Schaub - litb
2010-07-22 21:11:58