From: David Wells Date: Thu, 5 Dec 2019 16:44:50 +0000 (-0500) Subject: Clarify the destructor for FunctionParser. X-Git-Tag: v9.2.0-rc1~800^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9143%2Fhead;p=dealii.git Clarify the destructor for FunctionParser. --- diff --git a/include/deal.II/base/function_parser.h b/include/deal.II/base/function_parser.h index 947d6ce72e..87a6a5b1d4 100644 --- a/include/deal.II/base/function_parser.h +++ b/include/deal.II/base/function_parser.h @@ -256,10 +256,9 @@ public: FunctionParser(FunctionParser &&) = delete; /** - * Destructor. Explicitly delete the FunctionParser objects (there is one - * for each component of the function). + * Destructor. */ - ~FunctionParser() override; + virtual ~FunctionParser() override; /** * Copy operator. Objects of this type can not be copied, and diff --git a/source/base/function_parser.cc b/source/base/function_parser.cc index 291b4b4f16..1a0b4d33bf 100644 --- a/source/base/function_parser.cc +++ b/source/base/function_parser.cc @@ -79,9 +79,11 @@ FunctionParser::FunctionParser(const std::string &expression, } -// We deliberately delay the definition of the default destructor -// so that we don't need to include the definition of mu::Parser -// in the header file. + +// Note: we explicitly define the destructor here (instead of silently using +// the default destructor by declaring nothing in the header) since we do not +// expect muParser.h to be available in user projects: i.e., the destructor +// must be defined in the source file. template FunctionParser::~FunctionParser() = default;