From 2b7dcd3f4aef80e5ed2cd41cff4005e3a9525a90 Mon Sep 17 00:00:00 2001 From: Benjamin Buch Date: Mon, 9 Oct 2017 12:57:14 +0200 Subject: [PATCH] avoid warning about non-virtual destructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ´Value´ and ´standard_value´ don't have a virtual destructor. When I understand the code right, this is intended, because they are used through ´shared_ptr´ and so its not required. Nevertheless, clang does warn about it, since at the point of the destructor call it can not check if the object has a final type. Adding the C++11 keyword ´final´ to ´standard_value´ avoids this warning. --- include/cxxopts.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index fe7d8ef..ae5925d 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -694,7 +694,7 @@ namespace cxxopts }; template - class standard_value : public Value + class standard_value final : public Value { public: standard_value()