diff --git a/include/boost/log/utility/formatting_ostream.hpp b/include/boost/log/utility/formatting_ostream.hpp index 4d57ac4..3620c63 100644 --- a/include/boost/log/utility/formatting_ostream.hpp +++ b/include/boost/log/utility/formatting_ostream.hpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -404,7 +404,7 @@ public: } // When no native character type is supported, the following overloads are disabled as they have ambiguous meaning. - // Use basic_string_ref, basic_string_view or basic_string to explicitly indicate that the data is a string. + // Use basic_string_view or basic_string to explicitly indicate that the data is a string. #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) basic_formatting_ostream& operator<< (wchar_t c) { @@ -540,7 +540,7 @@ public: template< typename OtherCharT, typename OtherTraitsT > friend typename aux::enable_if_streamable_char_type< OtherCharT, basic_formatting_ostream& >::type - operator<< (basic_formatting_ostream& strm, basic_string_ref< OtherCharT, OtherTraitsT > const& str) + operator<< (basic_formatting_ostream& strm, basic_string_view< OtherCharT, OtherTraitsT > const& str) { return strm.formatted_write(str.data(), static_cast< std::streamsize >(str.size())); } @@ -561,7 +561,7 @@ public: template< typename OtherCharT, typename OtherTraitsT > friend typename aux::enable_if_streamable_char_type< OtherCharT, basic_formatting_ostream& >::type - operator<< (basic_formatting_ostream& strm, basic_string_ref< OtherCharT, OtherTraitsT >& str) + operator<< (basic_formatting_ostream& strm, basic_string_view< OtherCharT, OtherTraitsT >& str) { return strm.formatted_write(str.data(), static_cast< std::streamsize >(str.size())); } @@ -583,7 +583,7 @@ public: template< typename OtherCharT, typename OtherTraitsT > friend typename aux::enable_if_streamable_char_type< OtherCharT, basic_formatting_ostream& >::type - operator<< (basic_formatting_ostream&& strm, basic_string_ref< OtherCharT, OtherTraitsT > const& str) + operator<< (basic_formatting_ostream&& strm, basic_string_view< OtherCharT, OtherTraitsT > const& str) { return strm.formatted_write(str.data(), static_cast< std::streamsize >(str.size())); } @@ -604,7 +604,7 @@ public: template< typename OtherCharT, typename OtherTraitsT > friend typename aux::enable_if_streamable_char_type< OtherCharT, basic_formatting_ostream& >::type - operator<< (basic_formatting_ostream&& strm, basic_string_ref< OtherCharT, OtherTraitsT >& str) + operator<< (basic_formatting_ostream&& strm, basic_string_view< OtherCharT, OtherTraitsT >& str) { return strm.formatted_write(str.data(), static_cast< std::streamsize >(str.size())); } diff --git a/test/run/src_record_ostream.cpp b/test/run/src_record_ostream.cpp index 0d690e6..df79c1a 100644 --- a/test/run/src_record_ostream.cpp +++ b/test/run/src_record_ostream.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -153,7 +153,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(width_formatting, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE width_formatting< boost::basic_string_view< CharT > >(); } // Test support for filler character setup @@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(fill_formatting, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE fill_formatting< boost::basic_string_view< CharT > >(); } // Test support for text alignment @@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(alignment, CharT, char_types) typedef test_impl< CharT > test; test::BOOST_NESTED_TEMPLATE alignment< const CharT* >(); test::BOOST_NESTED_TEMPLATE alignment< typename test::string_type >(); - test::BOOST_NESTED_TEMPLATE alignment< boost::basic_string_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE alignment< boost::basic_string_view< CharT > >(); } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(rvalue_stream, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE rvalue_stream< boost::basic_string_view< CharT > >(); } #endif diff --git a/test/run/util_formatting_ostream.cpp b/test/run/util_formatting_ostream.cpp index 61db5e4..5f2e5fe 100644 --- a/test/run/util_formatting_ostream.cpp +++ b/test/run/util_formatting_ostream.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include "char_definitions.hpp" @@ -147,7 +147,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(width_formatting, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE width_formatting< boost::basic_string_view< CharT > >(); } // Test support for filler character setup @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(fill_formatting, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE fill_formatting< boost::basic_string_view< CharT > >(); } // Test support for text alignment @@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(alignment, CharT, char_types) typedef test_impl< CharT > test; test::BOOST_NESTED_TEMPLATE alignment< const CharT* >(); test::BOOST_NESTED_TEMPLATE alignment< typename test::string_type >(); - test::BOOST_NESTED_TEMPLATE alignment< boost::basic_string_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE alignment< boost::basic_string_view< CharT > >(); } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) @@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(rvalue_stream, CharT, char_types) typedef test_impl< CharT > test; 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_ref< CharT > >(); + test::BOOST_NESTED_TEMPLATE rvalue_stream< boost::basic_string_view< CharT > >(); } #endif @@ -395,8 +395,8 @@ BOOST_AUTO_TEST_CASE(character_code_conversion) test_widening_code_conversion< const char* >(); test_narrowing_code_conversion< std::wstring >(); test_widening_code_conversion< std::string >(); - test_narrowing_code_conversion< boost::wstring_ref >(); - test_widening_code_conversion< boost::string_ref >(); + test_narrowing_code_conversion< boost::wstring_view >(); + test_widening_code_conversion< boost::string_view >(); } #endif