<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/110231>110231</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang++-19] "error: type constraint differs in template redeclaration"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mpusz
</td>
</tr>
</table>
<pre>
I get the following error while compiling on clang-19:
```text
[build] ../../src/core/include/mp-units/framework/quantity_point.h:111:26: error: type constraint differs in template redeclaration
[build] 111 | MP_UNITS_EXPORT template<QuantitySpec auto QS>
[build] | ^
[build] ../../src/core/include/mp-units/framework/quantity_point_concepts.h:35:26: note: previous template declaration is here
[build] 35 | MP_UNITS_EXPORT template<QuantitySpec auto QS>
[build] | ^
```
Here are the offending declarations:
- https://github.com/mpusz/mp-units/blob/5f2cb780376592b967869544a0178e09a64ddfda/src/core/include/mp-units/framework/quantity_point.h#L111-L114
- https://github.com/mpusz/mp-units/blob/5f2cb780376592b967869544a0178e09a64ddfda/src/core/include/mp-units/framework/quantity_point_concepts.h#L35-L36
The same code works fine on clang-17, clang-18, gcc-13, and gcc-14.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVEFv5CYY_TX4gmwZMHZ88GGSWasrTdvdJpV6G2H4bNNicAEnzf76CmeSnapRL9sealn4A4unx_seT4SgJwvQIX6L-DETW5yd75Z1C1-ywann7iOeIOI4Ax6dMe5J2wmD987jp1kbwNItqzZp1VksjbBTTlrEDqg8ovJ1rMuXN8If8bLEb4dNG4X4ERcFov0-BC8R7aXzgGivrTSbStWy5pvVMSDaj14s8OT8b4j2v2_CRh2fz6vTNhYzYgdCCGIHWiN2eGGZivi8Jp42RC-0jVjpcQQfsLY4wrIaEQF7UCCN8CJqZ_9OEWNCCEbNHf7-0_nnHz4-3J8__PLpx58e3hAQu_t84XO_gsRiiw5_vkfsw3to6UloiL_z-9_R4yydlbDGsAvD-Jsu1iW2B7x6eNRuC19FuJIA64Bn8PAuecb_Uyle3XJtoe_AAxYedie6cQSrkueuGIc30-V4jnHd57RHtJ90nLehkG7ZtdvCl79qOBg3INrzkcqhuSlZU_OWDm3d3NQtrypRkuYGylbUlVKjEt_uU8pOhJD8REj1f2B87STKToznJ1ZfN-dhBhzEki6ZApwwAh61hatIaBC9e61vUj1JmROWKmHVy6wqMtUx1bJWZNCRhjYVK3ldZXNHVKW4IBJq2Upo1NjSemS8ITXhAGWb6Y6WtCpb2pRt1dKqkGVbk6EdCBc1lyBQVcIitCmMeVwK56dMh7BBR0hJGcmMGMCEPQYp3XkiSlMi-i5tyIdtCqgqjQ4xfIWIOpo9Oy87bhG9TfHHjxhR-g0BRGm2edP9gysSh8snX737FWRMnU1nSt28HOuxo38GAAD___iG1XY">