diff --git a/libwccl/ops/expression.h b/libwccl/ops/expression.h index 8d3e71a84c6c9cf8e351faf13dfc063c176a8061..a49cb1ea941a921d53dcc58c53b88c53e4865a32 100644 --- a/libwccl/ops/expression.h +++ b/libwccl/ops/expression.h @@ -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 */