
29 Dec
2008
29 Dec
'08
4:25 a.m.
On Sun, Dec 28, 2008 at 23:04, Max
I'm using this technique for stream:
std::ofstream outstream(strPath); boost::shared_ptrstd::ofstream os_auto_closer(&outstream, boost::bind(&std::ofstream::close, _1));
You're being a bit more careful than you need to there; file streams call close on destruction for you. (Well, the filebuf does [27.8.1.2].)