summaryrefslogtreecommitdiff
path: root/include/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-07 15:10:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-07 16:58:51 +0200
commit0cf956017477ad4f6aaae413eb434ab9b870725d (patch)
treeef8b0f575d00dc2c09e9ca67ef6bac52dd51bbff /include/rtl
parent9c55e725a45b027fade9084c0d9b82178fa1a04f (diff)
Avoid dangling pData when constructing OUString from temporary OUStringLiteral
...afer 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" Change-Id: I8afab29e9b7477c8a6c519b61d1fd6b3c21589e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102174 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r--include/rtl/string.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index ca1fd99b7fba..3a95b807c3a0 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -299,6 +299,7 @@ public:
*/
template<std::size_t N> OString(OStringLiteral<N> const & literal):
pData(const_cast<rtl_String *>(reinterpret_cast<rtl_String const *>(&literal))) {}
+ template<std::size_t N> OString(OStringLiteral<N> &&) = delete;
/// @endcond
#endif