From f7f592dfc96086ddaaf77150b072adbca4627dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 23 Jul 2018 13:19:21 +0200 Subject: [PATCH] Introduce "C-namespaced" UDL for StringRef --- include/internal/catch_stringref.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/internal/catch_stringref.h b/include/internal/catch_stringref.h index 757d70cc..05206b0b 100644 --- a/include/internal/catch_stringref.h +++ b/include/internal/catch_stringref.h @@ -127,4 +127,8 @@ namespace Catch { } // namespace Catch +inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + #endif // CATCH_STRINGREF_H_INCLUDED