Fixed no-return warning

This commit is contained in:
Andrzej Krzemienski
2015-06-03 18:22:41 +02:00
parent 9b1894a2f3
commit b43ce289c2

View File

@ -1271,9 +1271,10 @@ get_pointer ( optional<T>& opt )
// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
template<class CharType, class CharTrait>
std::basic_ostream<CharType, CharTrait>&
operator<<(std::basic_ostream<CharType, CharTrait>&, optional_detail::optional_tag const&)
operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&)
{
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
return os;
}
// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).