must have a move constructor for some compilers
This commit is contained in:
@ -17,6 +17,7 @@
|
|||||||
// collection of smart pointers for specific purposes
|
// collection of smart pointers for specific purposes
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace LAMMPS_NS {
|
namespace LAMMPS_NS {
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ class SafeFilePtr {
|
|||||||
SafeFilePtr(FILE *_fp) : fp(_fp) {};
|
SafeFilePtr(FILE *_fp) : fp(_fp) {};
|
||||||
|
|
||||||
SafeFilePtr(const SafeFilePtr &) = delete;
|
SafeFilePtr(const SafeFilePtr &) = delete;
|
||||||
SafeFilePtr(const SafeFilePtr &&) = delete;
|
SafeFilePtr(SafeFilePtr &&o) noexcept : fp(std::exchange(o.fp, nullptr)) {}
|
||||||
SafeFilePtr &operator=(const SafeFilePtr &) = delete;
|
SafeFilePtr &operator=(const SafeFilePtr &) = delete;
|
||||||
|
|
||||||
~SafeFilePtr()
|
~SafeFilePtr()
|
||||||
|
|||||||
Reference in New Issue
Block a user