diff options
-rw-r--r-- | src/support/utilities.h | 2 | ||||
-rw-r--r-- | src/wasm.h | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/support/utilities.h b/src/support/utilities.h index 57d170269..a8acfeed7 100644 --- a/src/support/utilities.h +++ b/src/support/utilities.h @@ -64,7 +64,7 @@ std::unique_ptr<T> make_unique(Args&&... args) { class Fatal { public: Fatal() { std::cerr << "Fatal: "; } - template<typename T> Fatal& operator<<(T arg) { + template<typename T> Fatal& operator<<(T&& arg) { std::cerr << arg; return *this; } diff --git a/src/wasm.h b/src/wasm.h index eb5c15514..65f70cef9 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -746,6 +746,15 @@ public: Expression(Id id) : _id(id) {} +protected: + // An expression cannot be constructed without knowing what kind of expression + // it should be. + Expression(const Expression& other) = default; + Expression(Expression&& other) = default; + Expression& operator=(Expression& other) = default; + Expression& operator=(Expression&& other) = default; + +public: void finalize() {} template<class T> bool is() const { |