summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorJF Bastien <github@jfbastien.com>2016-01-20 14:13:09 -0800
committerJF Bastien <github@jfbastien.com>2016-01-20 14:13:09 -0800
commitdb405e1b6cbe6be6a6bf5231340260d7fa53b5ee (patch)
tree960d8f898292c228e4e7b5b789651a02ebfa4f42 /src/wasm.h
parentb942d638054b4d17a228de483f2677a47087b6ed (diff)
downloadbinaryen-db405e1b6cbe6be6a6bf5231340260d7fa53b5ee.tar.gz
binaryen-db405e1b6cbe6be6a6bf5231340260d7fa53b5ee.tar.bz2
binaryen-db405e1b6cbe6be6a6bf5231340260d7fa53b5ee.zip
Name: support std::string ctor
This makes other code less verbose
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h1
1 files changed, 1 insertions, 0 deletions
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);