chart2/source/tools/InternalData.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e5ba7ef1b89a9dcc48509c9bf7d6059dc8aa7ae3
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Nov 4 09:30:14 2021 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Nov 4 10:29:36 2021 +0100

    libstdc++ bug 103022 is fixed in GCC 12
    
    (<https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html> states 
that
    _GLIBCXX_RELEASE "first appeared in the GCC 7.1 release and is not defined 
for
    GCC 6.x or older releases", leaving it a bit unclear what the status is for 
our
    GCC 7.0.0 baseline, so play it safe and assume it can be undefined)
    
    Change-Id: Iae10060bdab88e2e6df3954c2b6806534a761b31
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124675
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/chart2/source/tools/InternalData.cxx 
b/chart2/source/tools/InternalData.cxx
index 143a097d0c25..dd48289e831c 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -69,9 +69,11 @@ private:
 template< typename T >
     Sequence< T > lcl_ValarrayToSequence( const std::valarray< T > & rValarray 
)
 {
+#if defined __GLIBCXX__ && (!defined _GLIBCXX_RELEASE || _GLIBCXX_RELEASE < 12)
     // workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103022
     if (!size(rValarray))
         return Sequence<T>();
+#endif
 
     return comphelper::containerToSequence(rValarray);
 }

Reply via email to