File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-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 =" 4303" status =" New" >
5+ <title >Interaction between LWG 2259 and <i >Constraints</i > of member functions</title >
6+ <section ><sref ref =" [member.functions]" /></section >
7+ <submitter >Jiang An</submitter >
8+ <date >24 Jul 2025</date >
9+ <priority >99</priority >
10+
11+ <discussion >
12+ <p >
13+ <sref ref =" [member.functions]" />/2 seems to allow that even when the constraints are not met,
14+ such a default constructor can be selected, because no restriction is imposed when no overload
15+ is originally selected. Per the discussion in LWG <iref ref =" 2563" /> (closed as NAD), it even
16+ seems to allow the implementation to add a default constructor when there's originally none.
17+ <p />
18+ However, we're constraining some member functions, e.g. default constructors of `unique_ptr`,
19+ `tuple`, and `variant`. Allowance of more permissive overload sets of constructors effectively
20+ renders the <i >Constraints</i > meaningless, because even if the implementation doesn't constrain
21+ the default constructors at all, it can still satisfy the restriction in
22+ <sref ref =" [member.functions]" />/2 since LWG <iref ref =" 2259" />.
23+ <p />
24+ Perhaps some wording change is necessary to guarantee the <i >Constraints</i > of member functions to be meaningful.
25+ </p >
26+ </discussion >
27+
28+ <resolution >
29+ </resolution >
30+
31+ </issue >
You can’t perform that action at this time.
0 commit comments