From 96f6df5b89a300ef69dcba929a2810cb3e5e26ef Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 14 Oct 2020 21:02:41 +0200 Subject: Explicitly declare all special methods --- pugl/pugl.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'pugl/pugl.hpp') 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 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 { 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(type), flags)} , _clock(*this) -- cgit v1.2.1