summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-10-16 15:11:22 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-10-16 15:11:22 +0200
commit214baf4cdd49b52b56cd000e45a3f222120d4db2 (patch)
treef61f2e32c754cfcf181ac90561e80e795e425894 /src
parent6ff6058cebd1e501207c9b3b43ee5e4d0fd4d218 (diff)
add a _str user defined literal to create String
Diffstat (limited to 'src')
-rw-r--r--src/string.hh5
1 files changed, 5 insertions, 0 deletions
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<String> split(const String& str, char separator);
+inline String operator"" _str(const char* str, size_t)
+{
+ return String(str);
+}
+
}
namespace std