summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-05-28 09:12:27 +0300
committerTor Lillqvist <tml@iki.fi>2013-05-28 09:16:13 +0300
commitb2a50c70072d55d0055d41e6862138a6a06cb08d (patch)
treedc105963eddb9e108122f425f3bab1f8a13bf483
parent00f13ed9dd944846740e6a9867cf02a48585a609 (diff)
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
-rw-r--r--include/sal/log.hxx5
1 files changed, 5 insertions, 0 deletions
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.