From 214baf4cdd49b52b56cd000e45a3f222120d4db2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 16 Oct 2012 15:11:22 +0200 Subject: [PATCH] add a _str user defined literal to create String --- src/string.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/string.hh b/src/string.hh index 0b24a15f..dbb9a58d 100644 --- a/src/string.hh +++ b/src/string.hh @@ -94,6 +94,11 @@ String int_to_str(int value); int str_to_int(const String& str); std::vector split(const String& str, char separator); +inline String operator"" _str(const char* str, size_t) +{ + return String(str); +} + } namespace std