-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement char8_t compatibility remedies #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
57b6f21
c38a7ac
2386247
469d6c3
4f5c7ae
47c9372
53acdbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -912,15 +912,49 @@ basic_ostream<char, _Traits>& operator<<( | |
| } | ||
|
|
||
| #ifdef __cpp_char8_t // These deleted overloads are specified in P1423. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to other reviewers: This means the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's fine, in any case only "he who likes pain" will use |
||
| // don't insert a UTF-8 NTBS | ||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<( | ||
| basic_ostream<char, _Traits>&, const char8_t*) = delete; // don't insert a UTF-8 NTBS | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*) = delete; | ||
|
|
||
| // don't insert a UTF-8 code unit | ||
|
miscco marked this conversation as resolved.
|
||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<( | ||
| basic_ostream<char, _Traits>&, char8_t) = delete; // don't insert a UTF-8 code unit | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char8_t) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char8_t) = delete; | ||
| #endif // __cpp_char8_t | ||
|
|
||
| #if !_HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20 | ||
| #ifdef _NATIVE_WCHAR_T_DEFINED | ||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete; | ||
|
|
||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete; | ||
| #endif // _NATIVE_WCHAR_T_DEFINED | ||
|
|
||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char16_t) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char32_t) = delete; | ||
|
|
||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char16_t) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete; | ||
|
|
||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete; | ||
|
|
||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*) = delete; | ||
| template <class _Traits> | ||
| basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete; | ||
| #endif // !_HAS_STREAM_INSERTION_OPERATORS_DELETED_IN_CXX20 | ||
|
|
||
| template <class _Ostr, class _Ty, class = void> | ||
| struct _Can_stream_out : false_type {}; | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.