本文介绍了将char8_t const *输出到cout和wcout,一个不编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

自。

The exhibited behavior matches what is specified in P1423R1. During a recent LWG review, it was requested that the char8_t, char16_t, and char32_t related overloads also be deleted for wide streams. P1423R2 includes that change, so compilation of the example code will also fail for std::wcout when/if that is implemented. That revision hasn't been published in a mailing yet, but can be previewed at https://rawgit.com/sg16-unicode/sg16/master/papers/p1423r2.html.

正如@Nicol所说,我们不会尚未就删除的重载的行为达成共识。他们应该隐式转码吗?如果是这样,如何处理转码错误?还是应该只是流字节?但是,如果附加了 codecvt 构面(将会期望执行编码),会发生什么情况。应该有一个 std :: u8out 吗?还是我们应该提供更好的代码转换工具,并要求将其显式调用? SG16将致力于为C ++ 23回答这些问题。

As @Nicol mentioned, we don't yet have consensus for what the behavior of the deleted overloads should be. Should they implicitly transcode? If so, how are errors in transcoding handled? Or should they just stream bytes? But then what happens if a codecvt facet is attached (it will expect execution encoding). Should there be a std::u8out? Or should we provide better transcoding facilities and require they be explicitly invoked? SG16 will be working to answer these questions for C++23.

这篇关于将char8_t const *输出到cout和wcout,一个不编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 10:07