<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58165>58165</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Partial ordering of constrained member functions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
PiliLatiesa
</td>
</tr>
</table>
<pre>
```c++
template<typename>
constexpr bool b = true;
template<typename T>
concept C = b<T>;
template<typename T, typename U>
class foo
{
public:
void bar() const requires C<T> {} // #1
void bar() const requires (C<T> && C<U>) {} // Subsumes #1
};
template<typename T, typename U>
void bar(foo<T, U> const &) requires C<T> {} // #2
template<typename T, typename U>
void bar(foo<T, U> const &) requires (C<T> && C<U>) {} // Subsumes #2
int main()
{
foo<int, int> x;
x.bar(); // Clang reports an ambiguity
bar(x); // Clang does not complain
return 0;
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9lMuumzAQhp_GbEaNjAm3BYs26Vl1caS2D2CDQ1wZTH05Td6-gyG3SkeKWqmShY1n5p_PMxhhunND6J7Qj6Sgy2gJ-zSPuOvlMGnuJcl2_jzJkQ-4_LzYWjM6L0-TBWGMBgEk24O3AT3W6Hc14Nu9SisnD7sYLtAp2p6RYDu4vn2_CWruHByMWQXKVWkKQquWZKskwJtRHQhuCasIqyEeB6z8GZSVDnYrCcwC5R4Ie8GBU5Y-J4C7Nw1W4IiaERS9H2W_BuHCEKMu-mj9hyrcsc2lmDnQcbavnBGpfua87L8x_HXJHhDV6GHgalza8sdXALCgoNMMM0-Y7HStNMBpc20p7l6y7TQfeySdjPUO-Ah8EKoPyp8vcUvUaQ17jOsMco7G47nn8iHbGmSlD3YEeus0dv3xPt4fbXkmskmLYluXVV2VSddkXZ3VPPHKa9m8cusV12BsJ63C3OawVNtiWtnBIAchLRzC2HqF-0mwujl6P7n5akToXvljEBtkxRet3y7Th8maH7LFwr0o54J0uMirtMiTYyO22IUiyw5tVeYHllairmQt0pp24pBvu0RzIbVrSI4_FzbKXxAlcE3yfaIaRhlLKc3TLa235YYVZStpS0XN27RNKdlSiT3Vm5ljY2yf2CYiidA7NGrlvLsZ8Q-g-lHKmA71efBHY5tXpdUX7pV0PInpm4j_GzXAcE8">