include/sal/log.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 965ac9915280e3d570d7b32ff20799507f4e42eb
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Aug 30 18:31:33 2018 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Aug 31 10:32:30 2018 +0200

    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 <sberg...@redhat.com>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to