diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-08-27 11:09:17 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2021-08-27 11:09:17 +0200 |
commit | a4ae837e8e964aa500b328de865b27442a6b7165 (patch) | |
tree | 3719e89e156af51ceb09e93c96a7735a124e5bba /glib/glibmm/main.h | |
parent | 869e7bc8abf6047570fe5b0241fa580ea32e726f (diff) | |
download | glibmm-a4ae837e8e964aa500b328de865b27442a6b7165.tar.gz |
Declare some copy assignment operators deleted (=delete)
Avoid warnings from the clang++ compiler.
It's deprecated in C++ to implicitly declare a copy constructor, if there
is a user-defined copy assignment operator. Instead of declaring copy
assignment operators private without implementation, declare them deleted.
Diffstat (limited to 'glib/glibmm/main.h')
-rw-r--r-- | glib/glibmm/main.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h index 4dda91b6..5e57c5ba 100644 --- a/glib/glibmm/main.h +++ b/glib/glibmm/main.h @@ -190,7 +190,7 @@ private: GMainContext* context_; // no copy assignment - SignalTimeout& operator=(const SignalTimeout&); + SignalTimeout& operator=(const SignalTimeout&) = delete; }; class GLIBMM_API SignalIdle @@ -248,7 +248,7 @@ private: GMainContext* context_; // no copy assignment - SignalIdle& operator=(const SignalIdle&); + SignalIdle& operator=(const SignalIdle&) = delete; }; class GLIBMM_API SignalIO @@ -319,7 +319,7 @@ private: GMainContext* context_; // no copy assignment - SignalIO& operator=(const SignalIO&); + SignalIO& operator=(const SignalIO&) = delete; }; class GLIBMM_API SignalChildWatch @@ -350,7 +350,7 @@ private: GMainContext* context_; // no copy assignment - SignalChildWatch& operator=(const SignalChildWatch&); + SignalChildWatch& operator=(const SignalChildWatch&) = delete; }; /** Convenience timeout signal. @@ -693,8 +693,9 @@ private: MainLoop(); void operator delete(void*, std::size_t); - MainLoop(const MainLoop&); - MainLoop& operator=(const MainLoop&); + // noncopyable + MainLoop(const MainLoop&) = delete; + MainLoop& operator=(const MainLoop&) = delete; }; /** @relates Glib::MainLoop */ |