id summary reporter owner description type status milestone component version severity resolution keywords cc 1090 scoped_file class that deletes file at end of scope Marcus Lindblom Beman Dawes "I've found myself wanting this on a couple of occasions with 1.33.1, and I've done it with boost::shared_ptr: {{{ #!c++ boost::shared_ptr removeFile(&file, bind(&fs::remove, boost::cref(file))); }}} That didn't work with 1.34.1 (maybe due to compiler intricacies), so I did it properly: {{{ #!cpp class scoped_file { public: explicit scoped_file(const std::string& file) : m_path(file, boost::filesystem::native) {} explicit scoped_file(const boost::filesystem::path& file) : m_path(file) {} ~scoped_file() { boost::filesystem::remove(m_path); } private: boost::filesystem::path m_path; }; }}} That might be something to add?" Feature Requests new To Be Determined filesystem Not Applicable