summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-30 18:31:33 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-07-23 17:27:59 +0200
commit4c97240e0c0803eca275bd5c883a771a4faf5d55 (patch)
tree48b24826ff4f8719fcfba97f1b8af42fe5318196 /include
parentdfca9f1cd7be303a7be3cfe8fdc3416f19814850 (diff)
At least MSVC 19.15.26726 (VS 2017 15.8.1) needs the SAL_STREAM fix too
...that was originally introduced for libc++ in 691b6ea8e100fc55f0ff70a82511722733113a07 "Make the SAL_STREAM thing compile with clang++ -std=c++11 -stdlib=libc++". MSVC and clang-cl builds now started to fail like > [build CXX] sfx2/source/control/bindings.cxx > C:/lo-clang/core/sfx2/source/control/bindings.cxx(1333,19): error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char, char_traits<char>, allocator<char> > &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(169,6): note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > C:/lo-clang/core/include\sal/log.hxx(306,20): note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(120,53): note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ [...] Change-Id: Icb311c8a61cd7e7f450a45fc7f07327e94b5d186 Reviewed-on: https://gerrit.libreoffice.org/59833 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 965ac9915280e3d570d7b32ff20799507f4e42eb)
Diffstat (limited to 'include')
-rw-r--r--include/sal/log.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 6bcd34b09fe2..00d533ab5495 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -161,7 +161,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
@since LibreOffice 3.5
*/
-#ifdef _LIBCPP_VERSION
+#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
#define SAL_STREAM(stream) \
(::std::ostringstream() << stream).str()
#else