Title
`regex_traits::transform_primary` mistakenly detects `typeid` of a function
Status
voting
Section
[re.traits]
Submitter
Jiang An

Created on 2024-12-18.00:00:00 last changed 2 days ago

Messages

Date: 2025-02-07.16:08:22

Proposed resolution:

This wording is relative to N5001.

  1. Modify [re.traits] as indicated:

    template<class ForwardIterator>
      string_type transform_primary(ForwardIterator first, ForwardIterator last) const;
    

    -7- Effects: If

    typeid(use_facet<collate<charT>>(getloc())) == typeid(collate_byname<charT>)
    

    and the form of the sort key returned by collate_byname<charT>::transform(first, last) is known and can be converted into a primary sort key then returns that key, otherwise returns an empty string.

Date: 2025-02-15.00:00:00

[ 2025-02-07; Reflector poll ]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Date: 2024-12-18.00:00:00

[re.traits]/7 currently says typeid(use_facet<collate<charT>>) == typeid(collate_byname<charT>), which is always `false` because use_facet<collate<charT>> is a function template specialization while collate_byname<charT> is a class template specialization. This looks like misuse, and has been present in TR1 (N1836).

Presumably the intended operand is use_facet<collate<charT>>(getloc()).

History
Date User Action Args
2025-02-07 22:49:15adminsetstatus: ready -> voting
2025-02-07 16:08:22adminsetmessages: + msg14577
2025-02-07 16:08:22adminsetstatus: new -> ready
2024-12-21 13:49:14adminsetmessages: + msg14529
2024-12-18 00:00:00admincreate