From 2a8fbafbb8ffda76c8e21088f75d6cd4172669e4 Mon Sep 17 00:00:00 2001 From: roker Date: Mon, 7 Jun 2021 12:43:11 +0200 Subject: [PATCH] add operator""_sv(). --- src/string_view.hh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/string_view.hh b/src/string_view.hh index 7e0ba6a..3506350 100644 --- a/src/string_view.hh +++ b/src/string_view.hh @@ -32,11 +32,22 @@ namespace pEp { return s += v; } - + + // using ::std::operator+=; // using ::boost::operator+=; } // end of namespace pEp #endif // C++17 switch -#endif // PEP_DATATYPES_CONFIG_HH + +namespace pEp +{ + constexpr + string_view operator""_sv(const char* s, size_t sz) noexcept + { + return string_view(s,sz); + } +} + +#endif // PEP_DATATYPES_STRING_VIEW_HH