Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jarro2783/cxxopts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonxBulld <526677628@qq.com>2021-04-21 11:17:30 +0300
committerGitHub <noreply@github.com>2021-04-21 11:17:30 +0300
commit174510285a451d5e2ab2c4054bc88ce8b4ba933d (patch)
tree7b03c579ef0e7ae5d313754c5bb17a2b0b8c5fa6 /include
parentdd45a0801c99d62109aaa29f8c410ba8def2fbf2 (diff)
-Wsuggest-override is not supported by gcc before 5.0 (#283)
* -Wsuggest-override is not supported by gcc before 5.0 * GCC prior to 5.0 should ignore not only -Wnon-virtual-dtor but also -Weffc++, otherwise non-virtual destructor problems will still be reported. * The `#pragma GCC diagnostic push' should be used before setting up the temporary environment.
Diffstat (limited to 'include')
-rw-r--r--include/cxxopts.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp
index eee7ba0..9776558 100644
--- a/include/cxxopts.hpp
+++ b/include/cxxopts.hpp
@@ -288,8 +288,9 @@ namespace cxxopts
#if defined(__GNUC__)
// GNU GCC with -Weffc++ will issue a warning regarding the upcoming class, we want to silence it:
// warning: base class 'class std::enable_shared_from_this<cxxopts::Value>' has accessible non-virtual destructor
-#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#pragma GCC diagnostic ignored "-Weffc++"
// This will be ignored under other compilers like LLVM clang.
#endif
class Value : public std::enable_shared_from_this<Value>