summaryrefslogtreecommitdiff
path: root/src/utils/cpp/tmp_dir.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/cpp/tmp_dir.hpp')
-rw-r--r--src/utils/cpp/tmp_dir.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/utils/cpp/tmp_dir.hpp b/src/utils/cpp/tmp_dir.hpp
index b0dd5e5e..3801e7a0 100644
--- a/src/utils/cpp/tmp_dir.hpp
+++ b/src/utils/cpp/tmp_dir.hpp
@@ -33,13 +33,15 @@ class TmpDir {
/// \brief Destroy the TmpDir object. It tries to remove the tmp folder.
~TmpDir() noexcept;
- // no copies, only moves
+ // no copies, no moves
TmpDir(TmpDir const&) = delete;
- TmpDir(TmpDir&& other) noexcept = default;
+ TmpDir(TmpDir&& other) noexcept = delete;
auto operator=(TmpDir const&) = delete;
- auto operator=(TmpDir&& other) noexcept -> TmpDir& = default;
+ auto operator=(TmpDir&& other) noexcept -> TmpDir& = delete;
- [[nodiscard]] auto GetPath() const noexcept -> std::filesystem::path;
+ [[nodiscard]] auto GetPath() const& noexcept
+ -> std::filesystem::path const&;
+ [[nodiscard]] auto GetPath() && = delete;
/// \brief Creates a completely unique directory in a given prefix path.
[[nodiscard]] static auto Create(
@@ -51,4 +53,4 @@ class TmpDir {
std::filesystem::path tmp_dir_{};
};
-#endif // INCLUDED_SRC_OTHER_TOOLS_TMP_DIR_HPP \ No newline at end of file
+#endif // INCLUDED_SRC_OTHER_TOOLS_TMP_DIR_HPP