Talk:cpp/keyword/char8 t
From cppreference.com
By default STD::cout does not support char8_t, you have to make overloaded operator:
STD::ostream& operator<<(STD::ostream &out, char8_t &Char){ STD::cout << static_cast<char>(Char) << STD::endl; }
- Yes, your notion was reflected here. --Space Mission (talk) 15:19, 22 June 2022 (PDT)
- I think the version you added is UB because it declares a full specialization of a standard library function template. But if the char parameter is a reference, then I think it's fine? --Ybab321 (talk) 03:05, 23 June 2022 (PDT)
- Yes, yes, yes. I updated it, hope now there's no UB? .) --Space Mission (talk) 05:26, 28 June 2022 (PDT)
- I think the version you added is UB because it declares a full specialization of a standard library function template. But if the char parameter is a reference, then I think it's fine? --Ybab321 (talk) 03:05, 23 June 2022 (PDT)