diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-12-07 14:41:49 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-01-24 21:55:29 +0300 |
commit | ae3b329b1822bc44049316ab22c88959b927a4a7 (patch) | |
tree | d97ad15f126c34df2fa8285481e8a907159d130e | |
parent | fc03b894489f39c81f69cd789fd9a08aa5acf91b (diff) |
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.
-rw-r--r-- | odb/context.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
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. |