summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host/config_global.h.in1
-rw-r--r--configure.ac4
-rw-r--r--include/rtl/string.hxx13
-rw-r--r--include/rtl/ustring.hxx32
4 files changed, 12 insertions, 38 deletions
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 1becb71a5ba5..850792479644 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -13,7 +13,6 @@ Any change in this header will cause a rebuild of almost everything.
#define CONFIG_GLOBAL_H
#define HAVE_CXX14_CONSTEXPR 0
-#define HAVE_CXX11_REF_QUALIFIER 0
#define HAVE_GCC_BUILTIN_ATOMIC 0
/* _Pragma */
#define HAVE_GCC_PRAGMA_OPERATOR 0
diff --git a/configure.ac b/configure.ac
index 9ebf25de6efd..f0c09476b7b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6228,8 +6228,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
AC_MSG_RESULT([$cxx11_ref_qualifier])
-if test "$cxx11_ref_qualifier" = yes; then
- AC_DEFINE([HAVE_CXX11_REF_QUALIFIER])
+if test "$cxx11_ref_qualifier" = no; then
+ AC_MSG_ERROR([Your $CXX does not support C++11 ref-qualifiers. This is no longer supported.])
fi
dnl _Pragma support (may require C++11)
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 2753713fc66f..c116250aa396 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -33,7 +33,6 @@
#include <rtl/stringutils.hxx>
#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
-#include <config_global.h>
#include <rtl/stringconcat.hxx>
#endif
@@ -351,14 +350,14 @@ public:
@param str a OString.
*/
OString & operator+=( const OString & str )
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
&
#endif
{
rtl_string_newConcat( &pData, pData, str.pData );
return *this;
}
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
void operator+=(OString const &) && = delete;
#endif
@@ -368,11 +367,7 @@ public:
@internal
*/
template< typename T1, typename T2 >
- OString& operator+=( const OStringConcat< T1, T2 >& c )
-#if HAVE_CXX11_REF_QUALIFIER
- &
-#endif
- {
+ OString& operator+=( const OStringConcat< T1, T2 >& c ) & {
sal_Int32 l = c.length();
if( l == 0 )
return *this;
@@ -383,11 +378,9 @@ public:
pData->length = l;
return *this;
}
-#if HAVE_CXX11_REF_QUALIFIER
template<typename T1, typename T2> void operator +=(
OStringConcat<T1, T2> const &) && = delete;
#endif
-#endif
/**
Clears the string, i.e, makes a zero-character string
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index e4dfe8d8346d..5f41ff3ea2ea 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -523,7 +523,7 @@ public:
@exception std::bad_alloc is thrown if an out-of-memory condition occurs
*/
OUString & operator+=( const OUString & str )
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
&
#endif
{
@@ -536,7 +536,7 @@ public:
rtl_uString_release(pNewData);
return *this;
}
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
void operator+=(OUString const &) && = delete;
#endif
@@ -549,7 +549,7 @@ public:
template<typename T>
typename libreoffice_internal::ConstCharArrayDetector<T, OUString &>::Type
operator +=(T & literal)
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
&
#endif
{
@@ -561,7 +561,7 @@ public:
libreoffice_internal::ConstCharArrayDetector<T>::length);
return *this;
}
-#if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER
+#if defined LIBO_INTERNAL_ONLY
template<typename T>
typename libreoffice_internal::ConstCharArrayDetector<T, OUString &>::Type
operator +=(T &) && = delete;
@@ -572,37 +572,25 @@ public:
template<typename T>
typename
libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
- operator +=(T & literal)
-#if HAVE_CXX11_REF_QUALIFIER
- &
-#endif
- {
+ operator +=(T & literal) & {
rtl_uString_newConcatUtf16L(
&pData, pData,
libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
libreoffice_internal::ConstCharArrayDetector<T>::length);
return *this;
}
-#if HAVE_CXX11_REF_QUALIFIER
template<typename T>
typename
libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
operator +=(T &) && = delete;
-#endif
/** @overload @since LibreOffice 5.4 */
- OUString & operator +=(OUStringLiteral const & literal)
-#if HAVE_CXX11_REF_QUALIFIER
- &
-#endif
- {
+ OUString & operator +=(OUStringLiteral const & literal) & {
rtl_uString_newConcatAsciiL(&pData, pData, literal.data, literal.size);
return *this;
}
-#if HAVE_CXX11_REF_QUALIFIER
void operator +=(OUStringLiteral const &) && = delete;
#endif
-#endif
#ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
/**
@@ -610,11 +598,7 @@ public:
@internal
*/
template< typename T1, typename T2 >
- OUString& operator+=( const OUStringConcat< T1, T2 >& c )
-#if HAVE_CXX11_REF_QUALIFIER
- &
-#endif
- {
+ OUString& operator+=( const OUStringConcat< T1, T2 >& c ) & {
sal_Int32 l = c.length();
if( l == 0 )
return *this;
@@ -625,11 +609,9 @@ public:
pData->length = l;
return *this;
}
-#if HAVE_CXX11_REF_QUALIFIER
template<typename T1, typename T2> void operator +=(
OUStringConcat<T1, T2> const &) && = delete;
#endif
-#endif
/**
Clears the string, i.e, makes a zero-character string