/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
#include <cstdio>
+
/** @class ScopedTemporary
* @brief A temporary file which is deleted when the ScopedTemporary object goes out of scope.
*/
-class ScopedTemporary : public boost::noncopyable
+class ScopedTemporary
{
public:
ScopedTemporary ();
~ScopedTemporary ();
+ ScopedTemporary (ScopedTemporary const&) = delete;
+ ScopedTemporary& operator= (ScopedTemporary const&) = delete;
+
/** @return temporary filename */
boost::filesystem::path file () const {
return _file;
private:
boost::filesystem::path _file;
- FILE* _open;
+ FILE* _open = nullptr;
};