summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-20 15:04:04 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-20 15:04:04 -0800
commit9f52fd46b6c6c961c8eeb9891e2a5c4f36fe09b2 (patch)
tree4e57722287cb0f4cccb8a133f8e312056a13a943
parentb942d638054b4d17a228de483f2677a47087b6ed (diff)
parentf757481c15046d3fe68d96135401c34e883cb802 (diff)
downloadbinaryen-9f52fd46b6c6c961c8eeb9891e2a5c4f36fe09b2.tar.gz
binaryen-9f52fd46b6c6c961c8eeb9891e2a5c4f36fe09b2.tar.bz2
binaryen-9f52fd46b6c6c961c8eeb9891e2a5c4f36fe09b2.zip
Merge pull request #126 from WebAssembly/jfbastien-patch-1
Name: support std::string ctor
-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..b36d4f3ed 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(), false) {}
friend std::ostream& operator<<(std::ostream &o, Name name) {
assert(name.str);