bool closeOnDestruction = true);
~TemporaryFile();
+ // Movable, but not copiable
+ TemporaryFile(TemporaryFile&&) = default;
+ TemporaryFile& operator=(TemporaryFile&&) = default;
+
int fd() const { return fd_; }
const fs::path& path() const;
Scope scope = Scope::DELETE_ON_DESTRUCTION);
~TemporaryDirectory();
+ // Movable, but not copiable
+ TemporaryDirectory(TemporaryDirectory&&) = default;
+ TemporaryDirectory& operator=(TemporaryDirectory&&) = default;
+
const fs::path& path() const { return path_; }
private:
ChangeToTempDir();
~ChangeToTempDir();
+ // Movable, but not copiable
+ ChangeToTempDir(ChangeToTempDir&&) = default;
+ ChangeToTempDir& operator=(ChangeToTempDir&&) = default;
+
const fs::path& path() const { return dir_.path(); }
private: