diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-20 20:20:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-21 07:35:50 +0200 |
commit | f0fcbcadac148a5bfd36b2a26795d45aef8eace4 (patch) | |
tree | bade826c5f4dc8148423af476b5c980a7de28837 /sal/qa | |
parent | 7d01ce4021bafde8184355f46d1cbe2c370767e1 (diff) |
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 <sbergman@redhat.com>
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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); |