diff options
Diffstat (limited to 'sal/inc/rtl')
-rw-r--r-- | sal/inc/rtl/string.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index a135d4ed400b..e45b837b7fe6 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -1479,6 +1479,20 @@ struct OStringHash /* ======================================================================= */ +/** + Support for rtl::OString in std::ostream (and thus in + CPPUNIT_ASSERT or SAL_INFO macros, for example). + + @since LibreOffice 3.7 + */ +template< typename charT, typename traits > std::basic_ostream<charT, traits> & +operator <<( + std::basic_ostream<charT, traits> & stream, rtl::OString const & string) +{ + return stream << string.getStr(); + // best effort; potentially loses data due to embedded null characters +} + } /* Namespace */ #ifdef RTL_USING |