From ae3b329b1822bc44049316ab22c88959b927a4a7 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 7 Dec 2019 14:41:49 +0300 Subject: Fix GCC 'implicitly-declared copy constructor is deprecated' warning Note that since c++11 the generation of the implicit copy constructor is deprecated for a class with a user-defined copy assignment operator. --- odb/context.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/odb/context.hxx b/odb/context.hxx index 4366fb7..69f4dea 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -1896,9 +1896,14 @@ public: private: static context* current_; +#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) + context& + operator= (context const&) = delete; +#else private: context& operator= (context const&); +#endif }; // Create concrete database context. -- cgit v1.1