Непонятное поведение std::next_permutation с std::wstringC++

Программы на C++. Форум разработчиков
Anonymous
Непонятное поведение std::next_permutation с std::wstring

Сообщение Anonymous »

Попробовав эту программу с Unicode, я обнаружил результаты, которые не имеют для меня смысла:

Код: Выделить всё

#include 
#include 
#include 

int main() {
std::locale::global(std::locale(""));
std::wcout.imbue(std::locale());
std::wstring unicodeString = L"⊓⊔⊏";           // FAIL!

// 6 permutations as expected
//  std::wstring unicodeString = L"abc";           // OK

size_t permutations_count = 0;
// Print the Unicode string
do {
std::wcout 

Подробнее здесь: [url]https://stackoverflow.com/questions/78737601/unclear-behaviour-of-stdnext-permutation-with-stdwstring[/url]

Вернуться в «C++»