From ef0e1be751f9d1af87fa54b34a19f8de57675491 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Tue, 10 Mar 2015 00:48:28 +0100 Subject: [PATCH] Convenience ctor for Id from std::string. --- Nodes.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Nodes.hpp b/Nodes.hpp index 3d177de..ec62ef0 100644 --- a/Nodes.hpp +++ b/Nodes.hpp @@ -85,6 +85,9 @@ public: explicit Id(char const* c) { value = Pointer(new std::string(c)); } + explicit Id(std::string const& c) { + value = Pointer(new std::string(c)); + } virtual bool emit(Emitter *emitter) const { return emitter->emit(*this);