Add ""_sv literal that works just like C++17 ""sv

This commit is contained in:
Jason Rhinelander 2020-03-02 14:22:43 -04:00
parent f18f86cf96
commit b3abcfc9ae
1 changed files with 7 additions and 0 deletions

View File

@ -238,3 +238,10 @@ using string_view = simple_string_view;
#endif
// Add a "foo"_sv literal that works exactly like the C++17 "foo"sv literal, but works with out
// implementation in pre-C++17.
namespace lokimq {
inline namespace literals {
string_view operator""_sv(const char* str, size_t len) { return {str, len}; }
}
}