From f0fcbcadac148a5bfd36b2a26795d45aef8eace4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 20 Aug 2018 20:20:22 +0200 Subject: Make OUStringLiteral ctor actually constexpr ...which had accidentally been broken with 87707670c993794ab12b0fad0f048f11429269c2 "Make OUStringLiteral more useful". (std::strlen unfortunately isn't constexpr, so need to use an explicit loop instead.) Change-Id: I9a820e2940b99a0c37124477810ef879d82c8325 Reviewed-on: https://gerrit.libreoffice.org/59344 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sal/qa') diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 58a938ae9328..687f6b3e5146 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -41,6 +41,9 @@ private: void testcall( const char str[] ); + // Check that OUStringLiteral ctor is actually constexpr: + static constexpr rtlunittest::OUStringLiteral dummy{"dummy"}; + CPPUNIT_TEST_SUITE(StringLiterals); CPPUNIT_TEST(checkCtors); CPPUNIT_TEST(checkUsage); -- cgit