Skip to content

Add note to state that basic_string<charT, ...>::traits_type::char_type == charT #198

@sdutoit

Description

@sdutoit

Daniel Krügler writes:

it seems that the following requirement expressed in the last
sentence
of 21.2 Character traits [char.traits] p3

"To specialize those templates to generate a string or iostream class
to handle a particular character container type CharT, that and its
related character traits class Traits are passed as a pair of
parameters to the string or iostream template as formal parameters
charT and traits. Traits::char_type shall be the same as CharT."

is hard to find in the standard, because a natural place for this was
sub-clause [string.require]. Would you consider to add a note of the
following content after 21.4.1 basic_string general requirements
[string.require] p3

"[Note: In every specialization basic_string<charT, traits,
Allocator>, the type traits_type::char_type shall be the same type as
charT. -- end note]"

as an editorial action?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions