Affected subclause: [ostream.inserters.character]
Change: Overload resolution for ostream inserters used with UTF-8 literals
. Rationale: Required for new features
. Effect on original feature: Valid C++ 2017 code that passes UTF-8 literals to
basic_ostream<char, ...>::operator<< or
basic_ostream<wchar_t, ...>::operator<< is now ill-formed
.
std::cout << u8"text";
std::cout << u8'X';
Affected subclause: [ostream.inserters.character]
Change: Overload resolution for ostream inserters
used with
wchar_t,
char16_t, or
char32_t types
. Rationale: Removal of surprising behavior
. Effect on original feature: Valid C++ 2017 code that passes
wchar_t,
char16_t, or
char32_t characters or strings
to
basic_ostream<char, ...>::operator<< or
that passes
char16_t or
char32_t characters or strings
to
basic_ostream<wchar_t, ...>::operator<< is now ill-formed
.
std::cout << u"text";
std::cout << u'X';
Affected subclause: [fs.class.path]
Change: Return type of filesystem path format observer member functions
. Rationale: Required for new features
. Effect on original feature: Valid C++ 2017 code that depends on the
u8string() and
generic_u8string() member functions of
std::filesystem::path
returning
std::string is not valid in this International Standard
.
std::filesystem::path p;
std::string s1 = p.u8string();
std::string s2 = p.generic_u8string();