From db405e1b6cbe6be6a6bf5231340260d7fa53b5ee Mon Sep 17 00:00:00 2001 From: JF Bastien Date: Wed, 20 Jan 2016 14:13:09 -0800 Subject: Name: support std::string ctor This makes other code less verbose --- src/wasm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/wasm.h b/src/wasm.h index ffca28f9e..e6a20ef56 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -71,6 +71,7 @@ struct Name : public cashew::IString { Name() : cashew::IString() {} Name(const char *str) : cashew::IString(str) {} Name(cashew::IString str) : cashew::IString(str) {} + Name(const std::string &str) : cashew::IString(str.c_str()) {} friend std::ostream& operator<<(std::ostream &o, Name name) { assert(name.str); -- cgit v1.2.3