File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 1786
1786
or, if not that,
1787
1787
1788
1788
\item
1789
- \tcode {F1} and \tcode {F2} are non-template functions with the same
1790
- parameter-type-lists, and \tcode {F1} is more constrained than \tcode {F2}
1789
+ \tcode {F1} and \tcode {F2} are non-template functions and
1790
+ \begin {itemize }
1791
+ \item
1792
+ they have the same non-object-parameter-type-lists\iref {dcl.fct }, and
1793
+ \item
1794
+ if they are member functions, both are direct members of the same class, and
1795
+ \item
1796
+ if both are non-static member functions,
1797
+ they have the same types for their object parameters, and
1798
+ \item
1799
+ \tcode {F1} is more constrained than \tcode {F2}
1791
1800
according to the partial ordering of constraints described in
1792
- \ref {temp.constr.order }, or if not that,
1801
+ \ref {temp.constr.order },
1802
+ \end {itemize }
1803
+ or if not that,
1804
+ \begin {example }
1805
+ \begin {codeblock }
1806
+ template <typename T = int>
1807
+ struct S {
1808
+ constexpr void f(); // \# 1
1809
+ constexpr void f(this S&) requires true; // \# 2
1810
+ };
1811
+
1812
+ void test() {
1813
+ S<> s;
1814
+ s.f(); // calls \# 2
1815
+ }
1816
+ \end {codeblock }
1817
+ \end {example }
1793
1818
1794
1819
\item
1795
1820
\tcode {F1} is a constructor for a class \tcode {D},
You can’t perform that action at this time.
0 commit comments