diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-06-16 16:14:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-06-16 23:05:34 +0200 |
commit | 433ab39b2175bdadb4916373cd2dc8e1aabc08a5 (patch) | |
tree | 8a108185efadbd9615ab69598b3c435badaa39a2 /comphelper/source/xml | |
parent | cb636701881df38f3092d499142acbf62f4eff3c (diff) |
Adapt implicit OString return value construction to C++23 P2266R1
With the recent implementation of
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html> "P2266R1:
Simpler implicit move" in Clang 13 trunk as
<https://github.com/llvm/llvm-project/commit/bf20631782183cd19e0bb7219e908c2bbb01a75f>
"[clang] Implement P2266 Simpler implicit move", a --with-latest-c++ build
started to fail with
> comphelper/source/xml/xmltools.cxx:103:20: error: no viable conversion from returned value of type 'char [39]' to function return type 'rtl::OString'
> return str;
> ^~~
[...]
> include/rtl/string.hxx:277:5: note: candidate constructor [with T = char [39]] not viable: expects an lvalue for 1st argument
> OString( T& value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type = libreoffice_internal::Dummy() )
> ^
[...]
etc.
Change-Id: If34f143a1855fdd7cd22ea3d7594f9381d50a7ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117336
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper/source/xml')
-rw-r--r-- | comphelper/source/xml/xmltools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comphelper/source/xml/xmltools.cxx b/comphelper/source/xml/xmltools.cxx index 74ad5faa67e7..366321076bad 100644 --- a/comphelper/source/xml/xmltools.cxx +++ b/comphelper/source/xml/xmltools.cxx @@ -100,7 +100,7 @@ namespace comphelper::xml aSeq[0], aSeq[1], aSeq[2], aSeq[3], aSeq[4], aSeq[5], aSeq[6], aSeq[7], aSeq[8], aSeq[9], aSeq[10], aSeq[11], aSeq[12], aSeq[13], aSeq[14], aSeq[15]); - return str; + return OString(str); } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |