[Libreoffice-commits] core.git: include/sal

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed May 19 05:28:21 UTC 2021


 include/sal/log.hxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 95e26d3dce4f5a3b2d010d5ca47b4e450905a100
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue May 18 12:58:34 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed May 19 07:27:32 2021 +0200

    tdf#142326: Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams"
    
    ...for libstdc++ 11.2, similar to 1f3dddd6f21d91c429190ae314dadeec409f35f4
    "Adapt to "libstdc++: Implement LWG 1203 for rvalue iostreams" for libstdc++ 12.
    The libstdc++ change referenced there has been backported to the releases/gcc-11
    branch past the releases/gcc-11.1.0 tag (i.e., only towards libstdc++ 11.2) as
    <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ca7d2f2ec9142995179a5d832a946b50de05e659>
    "libstdc++: Implement LWG 1203 for rvalue iostreams".
    
    According to
    <https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html>,
    <https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html#abi.versioning.__GLIBCXX__>,
    and <https://gcc.gnu.org/develop.html#timeline>, the right __GLIBCXX__ value for
    libstdc++ 11.1 should be 20210427, but at least
    libstdc++-devel-11.1.1-1.fc34.x86_64 defines it as 20210428 while not including
    the above "libstdc++: Implement LWG 1203 for rvalue iostreams" commit, so use
    that value here.
    
    Change-Id: I4e2c6d6ad8156a83f5c4bc861e4a118271928a20
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115738
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Jenkins

diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index f92f36e2ff33..c64ea5079c81 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -192,7 +192,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
 
     @since LibreOffice 3.5
 */
-#if defined _LIBCPP_VERSION || (defined _GLIBCXX_RELEASE && _GLIBCXX_RELEASE >= 12) \
+#if defined _LIBCPP_VERSION \
+    || (defined _GLIBCXX_RELEASE \
+        && (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 20210428))) \
     || (defined _MSC_VER && _MSC_VER >= 1915)
 #define SAL_STREAM(stream) \
     (::std::ostringstream() << stream).str()


More information about the Libreoffice-commits mailing list