C++ Logo

SG16

Advanced search

Subject: Re: [SG16-Unicode] code_unit_sequence and code_point_sequence
From: Lyberta (lyberta_at_[hidden])
Date: 2018-08-03 00:18:00


OK. I withdraw code_unit_sequence proposal but I think
code_point_sequence is still very relevant. Consider this:

std::code_point_sequence cps{u8"Test"};
for (const auto cp : cps)
{
    std::cout << std::code_point_name(cp) << '\n';
}

Output:

LATIN CAPITAL LETTER T
LATIN SMALL LETTER E
LATIN SMALL LETTER S
LATIN SMALL LETTER T

This fragment will be used pretty much everywhere when teaching C++ and
Unicode.




SG16 list run by herb.sutter at gmail.com