summaryrefslogtreecommitdiffstats
path: root/include/rtl/string.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/rtl/string.hxx')
-rw-r--r--include/rtl/string.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index f19d8713eaae..812ceb71cd9e 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -1804,6 +1804,10 @@ struct SAL_WARN_UNUSED OStringLiteral
{
template< int N >
explicit OStringLiteral( const char (&str)[ N ] ) : size( N - 1 ), data( str ) { assert( strlen( str ) == N - 1 ); }
+#if defined __cpp_char8_t
+ template< int N >
+ explicit OStringLiteral( const char8_t (&str)[ N ] ) : size( N - 1 ), data( reinterpret_cast<char const *>(str) ) { assert( strlen( data ) == N - 1 ); }
+#endif
int size;
const char* data;
};