File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3+
4+ <issue num =" 4186" status =" New" >
5+ <title >`regex_traits::transform_primary` mistakenly detects `typeid` of a function</title >
6+ <section ><sref ref =" [re.traits]" /></section >
7+ <submitter >Jiang An</submitter >
8+ <date >18 Dec 2024</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ <sref ref =" [re.traits]" />/7 currently says <tt >typeid(use_facet< collate< charT>> ) ==
14+ typeid(collate_byname< charT> )</tt >, which is always `false` because
15+ <tt >use_facet< collate< charT>> </tt > is a function template specialization while
16+ <tt >collate_byname< charT> </tt > is a class template specialization. This looks like
17+ misuse, and has been present in TR1 (<paper num =" N1836" />).
18+ <p />
19+ Presumably the intended operand is <tt >use_facet< collate< charT>> (getloc())</tt >.
20+ </p >
21+ </discussion >
22+
23+ <resolution >
24+ <p >
25+ This wording is relative to <paper num =" N5001" />.
26+ </p >
27+
28+ <ol >
29+ <li ><p >Modify <sref ref =" [re.traits]" /> as indicated:</p >
30+
31+ <blockquote >
32+ <pre >
33+ template< class ForwardIterator>
34+ string_type transform_primary(ForwardIterator first, ForwardIterator last) const;
35+ </pre >
36+ <blockquote >
37+ <p >
38+ -7- <i >Effects</i >: If
39+ </p >
40+ <blockquote ><pre >
41+ typeid(use_facet< collate< charT>> <ins >(getloc())</ins >) == typeid(collate_byname< charT> )
42+ </pre ></blockquote >
43+ <p >
44+ and the form of the sort key returned by <tt >collate_byname< charT> ::transform(first, last)</tt >
45+ is known and can be converted into a primary sort key then returns that key, otherwise returns an empty
46+ string.
47+ </p >
48+ </blockquote >
49+ </blockquote >
50+
51+
52+ </li >
53+
54+ </ol >
55+ </resolution >
56+
57+ </issue >
You can’t perform that action at this time.
0 commit comments