Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Sunday 09 of December 2012, Libreoffice Gerrit user wrote:
 sal/inc/rtl/ustrbuf.hxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit dc6277ef41dcf529760ad894e0aa124f18722c33
Author: Tor Lillqvist <tml@iki.fi>
Date:   Sun Dec 9 22:42:04 2012 +0200

    WaE: deleted function definitions are a C++11 extension

    Change-Id: I8f070fb53c0310761c3a0a2407d48ca1c1ac5e18

diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 3814a6f..9850bfa 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -579,10 +579,17 @@ public:
     // 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). 
+#if defined(__clang__) && defined(LIBO_WERROR) 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wc++11-extensions"
+#endif
     template< typename T >
     typename internal::Enable< void,
         !internal::CharPtrDetector< T* >::ok &&
!internal::SalUnicodePtrDetector< T* >::ok >::Type append( T* ) = delete;
+#if defined(__clang__) && defined(LIBO_WERROR)
+#pragma GCC diagnostic pop
+#endif
 #endif
 #endif

 That doesn't make sense. This code is inside #ifdef that gets enabled only 
inside configure part that requires C++11 support, so this part should get 
compiled only if we compile with C++11 support, thus there should be no way 
to get this warning. So how can anybody possibly need this?

 And, not to put a too fine point on it, I'd appreciate it if you could try 
something a bit more systematic such as fixing the configure check that's 
been put there for a reason instead of a half-assed band-aid somewhere in the 
code. If you think that's too much work, maybe you'll change your mind as 
you'll have to do this for every place where I add this next.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.