<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/75404>75404</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang incorrectly considers top-level cv-qualifiers when determining the parameter mapping for subsumption
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            clang:frontend,
            concepts
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          CaseyCarter
      </td>
    </tr>
</table>

<pre>
    Clang considers overload resolution for `f(42)` in this program to be ambiguous:
```c++
template <class> concept True = true;
template <class T> constexpr bool f(const T) { return false;} 
template <True T> constexpr bool f(T) { return true; } 
static_assert(f(42));
```
which I believe is (or at least should be - the wording around parameter mappings is a bit sparse) non-conforming. Top-level cv-qualifiers on function parameters in C++ should have no effect outside the body of the function definition. This behavior notably diverges from GCC and MSVC (https://godbolt.org/z/jhvnsf8nf). 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U8Fu6zYQ_BrqsrAhUZZtHXRI7LrooacavRaUtJT4QHFV7tJp-vUFlTR5eA8BCIhagrPDmVnD7KaA2KnmWTXXwiSZKXYXw_h6MVEwFj2Nr93FmzDBQIHdiJGBHhg9mREiMvkkjgJYiqCOpVX6fNBKt-pYggsgs2NYI03RLCAEPYJZejclSqzqJ1VeVfmkjuXbGpR-zmurCi6rN4Kg6svgDbOqf8kkBlwF7jHlgytITKjqr67A_f0SC_6zRuiJPGSOWwnuSregTs8QUVIMYI3nDe10hZ8Rt55fAf4I9c4LPqFYjLjhL8OMUZQ-f0ql248XfEjx9vsyu2GG36BH7_CB4BiUPlMEI-DRsADPlPyYdd2BzAgvFEcXJjCRUhhhNdEsKBhhMevqwsQZw0DvBHg1kTHzDhR2AwVLcXFh2sOd1p3HB3oYHru_k_HOus34ADaFYTP8A5mzz5c35_6nM5sHQiBAa3EQoCQ5OhvBnCggu-0_wEa0Lri83cM9R6bH2TwcRQgkpvevMLoHxgkZbKQFfr1cwIQRfv_jz0tWZBZZtzzpm9K3icaevOwpTkrf_lX69m1-BLbnYJVu91CMXT22dWsK7KpTqZuqqqq2mLtz09TaHrGtmqpsq9qem3PVmEa3rdWHFgvX6VLXla5qXR-aqt0PbXk0_TieqtbYGg_qUOJinN97_1gygcIxJ-xOzaE8FN706HkbN637NCmtlb4orYc8Yap-spGCYBg_D97yzrnQXIvYZdxdnyZWh9I7Fv7sJE48dhsUuDBQjDiIf_1ucOULX19mzB4IZv9zerI5P0Vnm3FOPadlzVYVKfruB-WdzKnfD7QofcvE3j-7NdI3HETp26YHK33bJPkvAAD__4gdecU">