Skip to content
Snippets Groups Projects
Commit 05e925b4 authored by Adam Wardynski's avatar Adam Wardynski
Browse files

Add virtual destructor to Expression, just in case.

Doesn't hurt and can help.
parent f5beef74
Branches
No related merge requests found
......@@ -9,7 +9,8 @@ namespace Wccl {
/**
* Abstract base class for WCCL expressions
*/
class Expression : public boost::noncopyable {
class Expression : boost::noncopyable
{
public:
/**
* @returns String representation of the expression.
......@@ -21,6 +22,13 @@ public:
* @note Might be incomplete and/or contain internal info.
*/
virtual std::string to_raw_string() const = 0;
/**
* Virtual destructor, so if delete is ever called on a base-class-type
* of pointer, the destruction is forwarded to proper destructor
* in a derived class, if a special destructor was needed for that class.
*/
virtual ~Expression() {};
};
} /* end ns Wccl */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment