]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clarify the destructor for FunctionParser. 9143/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 5 Dec 2019 16:44:50 +0000 (11:44 -0500)
committerDavid Wells <drwells@email.unc.edu>
Mon, 9 Dec 2019 19:30:22 +0000 (14:30 -0500)
include/deal.II/base/function_parser.h
source/base/function_parser.cc

index 947d6ce72e627af248b251a6e43129edb4d2ae10..87a6a5b1d4a3a70a104b0976425ade6fec1a5fc7 100644 (file)
@@ -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
index 291b4b4f162cde407ddda61700b505827ca108db..1a0b4d33bfff2f8b52da4e4602d14315332db0d1 100644 (file)
@@ -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;
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.