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();