diff --git a/include/jsoncons_ext/jmespath/jmespath.hpp b/include/jsoncons_ext/jmespath/jmespath.hpp index 3d6c6deb0b..db717c4d81 100644 --- a/include/jsoncons_ext/jmespath/jmespath.hpp +++ b/include/jsoncons_ext/jmespath/jmespath.hpp @@ -809,7 +809,7 @@ namespace detail { bool is_right_associative_; protected: - ~unary_operator() = default; // virtual destructor not needed + virtual ~unary_operator() = default; public: unary_operator(operator_kind oper) : precedence_level_(operator_table::precedence_level(oper)), @@ -847,7 +847,7 @@ namespace detail { std::size_t precedence_level_; bool is_right_associative_; protected: - ~binary_operator() = default; // virtual destructor not needed + virtual ~binary_operator() = default; public: binary_operator(operator_kind oper) : precedence_level_(operator_table::precedence_level(oper)), diff --git a/include/jsoncons_ext/jsonpath/expression.hpp b/include/jsoncons_ext/jsonpath/expression.hpp index 8c846e603b..1ee1f042a6 100644 --- a/include/jsoncons_ext/jsonpath/expression.hpp +++ b/include/jsoncons_ext/jsonpath/expression.hpp @@ -530,6 +530,8 @@ namespace detail { is_right_associative_(is_right_associative) { } + + virtual ~binary_operator() = default; std::size_t precedence_level() const {