From b2a50c70072d55d0055d41e6862138a6a06cb08d Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 28 May 2013 09:12:27 +0300 Subject: [PATCH] Nah, we still need the dynamic_cast in SAL_STREAM for gcc/libstdc++ Not sure if MSVC would accept also the simpler thing, but anyway, the dynamic_cast works for it, too. Change-Id: I2dfa1e70b75bc17d38b5e95be0a0f1dd66767bf1 --- include/sal/log.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sal/log.hxx b/include/sal/log.hxx index ca3bb5ecd6c7..23ea6f388c7c 100644 --- a/include/sal/log.hxx +++ b/include/sal/log.hxx @@ -157,8 +157,13 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) { @since LibreOffice 3.5 */ +#ifdef _LIBCPP_VERSION #define SAL_STREAM(stream) \ (::std::ostringstream() << stream).str() +#else +#define SAL_STREAM(stream) \ + (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) +#endif /** @page sal_log Basic logging functionality.