diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm-type.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index def5c7e2b..1b7d389ca 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -377,13 +377,17 @@ struct Tuple { Tuple(std::initializer_list<Type> types) : types(types) { validate(); } Tuple(const TypeList& types) : types(types) { validate(); } Tuple(TypeList&& types) : types(std::move(types)) { validate(); } + + // Allow copies when constructing. + Tuple(const Tuple& other) : types(other.types) { validate(); } + + // Prevent accidental copies. + Tuple& operator=(const Tuple&) = delete; + bool operator==(const Tuple& other) const { return types == other.types; } bool operator!=(const Tuple& other) const { return !(*this == other); } std::string toString() const; - // Prevent accidental copies - Tuple& operator=(const Tuple&) = delete; - private: void validate() { #ifndef NDEBUG |