must have a move constructor for some compilers

This commit is contained in:
Axel Kohlmeyer
2025-02-13 16:51:41 -05:00
parent 8ab8491da5
commit f84ed6f9a4

View File

@ -17,6 +17,7 @@
// collection of smart pointers for specific purposes
#include <cstdio>
#include <utility>
namespace LAMMPS_NS {
@ -36,7 +37,7 @@ class SafeFilePtr {
SafeFilePtr(FILE *_fp) : fp(_fp) {};
SafeFilePtr(const SafeFilePtr &) = delete;
SafeFilePtr(const SafeFilePtr &&) = delete;
SafeFilePtr(SafeFilePtr &&o) noexcept : fp(std::exchange(o.fp, nullptr)) {}
SafeFilePtr &operator=(const SafeFilePtr &) = delete;
~SafeFilePtr()