diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-05-18 12:58:34 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-16 11:56:22 +0200 |
commit | 0d00628eee27fded8898e87d0ce300e0764c020e (patch) | |
tree | 0bc2d8844a613d99d3cc44d4e8907ab6d66c29b9 /include | |
parent | 451c98f24cdfd29c5974f199bebfb68f17b1ef98 (diff) |
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@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 95e26d3dce4f5a3b2d010d5ca47b4e450905a100)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117231
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/log.hxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sal/log.hxx b/include/sal/log.hxx index 1193f882d98e..a3844ff0a129 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -163,7 +163,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() |