From 5c038a6906bd82edb1e17b42e92bbf2532e7cf8a Mon Sep 17 00:00:00 2001
From: David Wells <drwells@email.unc.edu>
Date: Thu, 5 Dec 2019 11:44:50 -0500
Subject: [PATCH] Clarify the destructor for FunctionParser.

---
 include/deal.II/base/function_parser.h | 5 ++---
 source/base/function_parser.cc         | 8 +++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

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<dim>::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 <int dim>
 FunctionParser<dim>::~FunctionParser() = default;
 
-- 
2.39.5