This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Open status.
Section: 23.2 [char.traits], 184.108.40.206 [string.require], 23.3.3 [string.view.template] Status: Open Submitter: Gennaro Prota Opened: 2017-07-03 Last modified: 2018-12-01
View all other issues in [char.traits].
View all issues with Open status.
basic_string and basic_string_view involve undefined behavior in a few cases where it's simple for the implementation to add a static_assert and make the program ill-formed.With regards to basic_string, 23.2 [char.traits]/3 states:
Traits::char_type shall be the same as CharT.
Here, the implementation can add a static_assert using the is_same type trait. Similar issues exist in 220.127.116.11 [string.require] and, for basic_string_view, in 23.3.3 [string.view.template]/1.
[2017-07 Toronto Tuesday PM issue prioritization]
Priority 3; need to check general container requirements
Partially by the adoption of P1148 in San Diego.
Tim opines: "the remainder deals with allocator value type mismatch, which I think is NAD."
This wording is relative to N4659.
Edit 23.2 [char.traits] as indicated:
-3- 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 parameters charT and traits. Traits::char_type
shall be the sameas CharT.
Edit 18.104.22.168 [string.require] as indicated:
-3- In every specialization basic_string<charT, traits, Allocator>,
the typeallocator_traits<Allocator>::value_type shall name the same typeas charT. Every object of type basic_string<charT, traits, Allocator> shall use an object of type Allocator to allocate and free storage for the contained charT objects as needed. The Allocator object used shall be obtained as described in 22.214.171.124 [container.requirements.general]. In every specialization basic_string<charT, traits, Allocator>, the type traits shall satisfy the character traits requirements (23.2 [char.traits]) , and the typetraits::char_type shall name the same typeas charT.
Edit 23.3.3 [string.view.template] as indicated:
-1- In every specialization basic_string_view<charT, traits>, the type traits shall satisfy the character traits requirements (23.2 [char.traits])
, and the typetraits::char_type shall name the same typeas charT.