summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rtl/strbuf.hxx12
-rw-r--r--include/rtl/ustrbuf.hxx2
2 files changed, 14 insertions, 0 deletions
diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 9fd9c1234ca6..1586c4e544de 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -542,6 +542,8 @@ public:
@param b a <code>bool</code>.
@return this string buffer.
+
+ @since LibreOffice 4.3
*/
OStringBuffer & append(bool b)
{
@@ -549,6 +551,16 @@ public:
return append( sz, rtl_str_valueOfBoolean( sz, b ) );
}
+ /// @cond INTERNAL
+ // Pointer can be automatically converted to bool, which is unwanted here.
+ // Explicitly delete all pointer append() overloads to prevent this
+ // (except for char* overload, which is handled elsewhere).
+ template< typename T >
+ typename internal::Enable< void,
+ !internal::CharPtrDetector< T* >::ok >::Type
+ append( T* ) SAL_DELETED_FUNCTION;
+ /// @endcond
+
/**
Appends the string representation of the <code>char</code>
argument to this string buffer.
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 84e15b6b7d09..f3470da77145 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -576,6 +576,7 @@ public:
return append( sz, rtl_ustr_valueOfBoolean( sz, b ) );
}
+ /// @cond INTERNAL
// Pointer can be automatically converted to bool, which is unwanted here.
// Explicitly delete all pointer append() overloads to prevent this
// (except for char* and sal_Unicode* overloads, which are handled elsewhere).
@@ -583,6 +584,7 @@ public:
typename internal::Enable< void,
!internal::CharPtrDetector< T* >::ok && !internal::SalUnicodePtrDetector< T* >::ok >::Type
append( T* ) SAL_DELETED_FUNCTION;
+ /// @endcond
// This overload is needed because OUString has a ctor from rtl_uString*, but
// the bool overload above would be prefered to the conversion.