diff options
author | David Robillard <d@drobilla.net> | 2020-10-14 21:02:41 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-14 21:02:41 +0200 |
commit | 96f6df5b89a300ef69dcba929a2810cb3e5e26ef (patch) | |
tree | 1823b6927aafeb28d12ec1052ca61fab0abb76bc /pugl | |
parent | 24949b8218a149b8030a85129c6c82c5427ef640 (diff) | |
download | pugl-96f6df5b89a300ef69dcba929a2810cb3e5e26ef.tar.gz pugl-96f6df5b89a300ef69dcba929a2810cb3e5e26ef.tar.bz2 pugl-96f6df5b89a300ef69dcba929a2810cb3e5e26ef.zip |
Explicitly declare all special methods
Diffstat (limited to 'pugl')
-rw-r--r-- | pugl/pugl.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pugl/pugl.hpp b/pugl/pugl.hpp index f6172d1..8686fa0 100644 --- a/pugl/pugl.hpp +++ b/pugl/pugl.hpp @@ -61,6 +61,12 @@ template<class T, FreeFunc<T> Free> class Wrapper { public: + Wrapper(const Wrapper&) = delete; + Wrapper& operator=(const Wrapper&) = delete; + + Wrapper(Wrapper&&) = default; + Wrapper& operator=(Wrapper&&) = default; + T* cobj() { return _ptr.get(); } const T* cobj() const { return _ptr.get(); } @@ -263,6 +269,12 @@ public: : _world{world} {} + Clock(const Clock&) = delete; + Clock& operator=(const Clock&) = delete; + + Clock(Clock&&) = delete; + Clock& operator=(Clock&&) = delete; + /// Return the current time time_point now() const; @@ -274,6 +286,12 @@ private: class World : public detail::Wrapper<PuglWorld, puglFreeWorld> { public: + World(const World&) = delete; + World& operator=(const World&) = delete; + + World(World&&) = delete; + World& operator=(World&&) = delete; + explicit World(WorldType type, WorldFlags flags) : Wrapper{puglNewWorld(static_cast<PuglWorldType>(type), flags)} , _clock(*this) |