#include <iostream>
#include <algorithm>
#include <boost/config.hpp>
+#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
+#include <string_view>
+#endif
#include <boost/test/unit_test.hpp>
#include <boost/utility/string_view.hpp>
#include <boost/log/core/record.hpp>
test::BOOST_NESTED_TEMPLATE width_formatting< const CharT* >();
test::BOOST_NESTED_TEMPLATE width_formatting< typename test::string_type >();
test::BOOST_NESTED_TEMPLATE width_formatting< boost::basic_string_view< CharT > >();
+#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
+ test::BOOST_NESTED_TEMPLATE width_formatting< std::basic_string_view< CharT > >();
+#endif
}
// Test support for filler character setup
test::BOOST_NESTED_TEMPLATE fill_formatting< const CharT* >();
test::BOOST_NESTED_TEMPLATE fill_formatting< typename test::string_type >();
test::BOOST_NESTED_TEMPLATE fill_formatting< boost::basic_string_view< CharT > >();
+#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
+ test::BOOST_NESTED_TEMPLATE fill_formatting< std::basic_string_view< CharT > >();
+#endif
}
// Test support for text alignment
test::BOOST_NESTED_TEMPLATE alignment< const CharT* >();
test::BOOST_NESTED_TEMPLATE alignment< typename test::string_type >();
test::BOOST_NESTED_TEMPLATE alignment< boost::basic_string_view< CharT > >();
+#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
+ test::BOOST_NESTED_TEMPLATE alignment< std::basic_string_view< CharT > >();
+#endif
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
test::BOOST_NESTED_TEMPLATE rvalue_stream< const CharT* >();
test::BOOST_NESTED_TEMPLATE rvalue_stream< typename test::string_type >();
test::BOOST_NESTED_TEMPLATE rvalue_stream< boost::basic_string_view< CharT > >();
+#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
+ test::BOOST_NESTED_TEMPLATE rvalue_stream< std::basic_string_view< CharT > >();
+#endif
}
#endif
return strm;
}
+template< typename CharT, typename TraitsT >
+inline std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, B*)
+{
+ strm << "B*";
+ return strm;
+}
+
+template< typename CharT, typename TraitsT >
+inline std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, const B*)
+{
+ strm << "const B*";
+ return strm;
+}
+
class C {};
template< typename CharT, typename TraitsT >
inline std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, C const&)
my_namespace::B b; // lvalue
strm_fmt << a << b << my_namespace::C(); // rvalue
strm_fmt << my_namespace::eee;
+ strm_fmt << &b << (my_namespace::B const*)&b;
strm_fmt.flush();
string_type rec_message = logging::extract_or_throw< string_type >(expr::message.get_name(), rec);
ostream_type strm_correct;
- strm_correct << a << b << my_namespace::C() << my_namespace::eee;
+ strm_correct << a << b << my_namespace::C() << my_namespace::eee << &b << (my_namespace::B const*)&b;
BOOST_CHECK(equal_strings(rec_message, strm_correct.str()));
}