summaryrefslogtreecommitdiff
path: root/include/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-30 18:31:33 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-31 10:32:30 +0200
commit965ac9915280e3d570d7b32ff20799507f4e42eb (patch)
tree10345d5051b4b0047d0b81783490dbf216e6c91d /include/sal
parent03b361673d04f31e0602d2988e4df26eaeb53a34 (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>
Diffstat (limited to 'include/sal')
-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