• Stephan Bergmann's avatar
    At least MSVC 19.15.26726 (VS 2017 15.8.1) needs the SAL_STREAM fix too · 965ac991
    Stephan Bergmann yazdı
    ...that was originally introduced for libc++ in
    691b6ea8 "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: 's avatarStephan Bergmann <sbergman@redhat.com>
    965ac991
log.hxx 13 KB