Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions include/boost/test/utils/lazy_ostream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
// Boost.Test
#include <boost/test/detail/config.hpp>

// Boost
#include <boost/static_assert.hpp>
#include <boost/type_traits/has_left_shift.hpp>

// STL
#include <iosfwd>

Expand Down Expand Up @@ -74,6 +78,8 @@ class lazy_ostream_impl : public lazy_ostream {
, m_prev( prev )
, m_value( value )
{
BOOST_STATIC_ASSERT_MSG( (boost::has_left_shift<std::ostream,T>::value),
"Type has to implement operator<< to be printable");
}

std::ostream& operator()( std::ostream& ostr ) const BOOST_OVERRIDE
Expand Down