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

    <tr>
        <th>Summary</th>
        <td>
            Poor readability of error messages with empty NTTPs
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    The following example https://godbolt.org/z/WxshW9nx1 prints plenty of curly braces in the error message:

```text
<source>:18:24: error: no matching function for call to 'time_to_goal'
   18 |   const quantity ttg = time_to_goal(half_marathon_distance, pace);
      | ^~~~~~~~~~~~
<source>:9:28: note: candidate template ignored: constraints not satisfied [with distance:auto = quantity<kilo_<metre>{}, double>, speed:auto = quantity<derived_unit<second, per<kilo_<metre>>>{}, double>]
 9 | QuantityOf<isq::time> auto time_to_goal(QuantityOf<isq::length> auto distance, QuantityOf<isq::speed> auto speed)
      | ^
<source>:9:80: note: because 'QuantityOf<mp_units::quantity<mp_units::derived_unit<mp_units::si::second, mp_units::per<mp_units::si::kilo_<mp_units::si::metre> > >{{{}}}>, isq::speed>' evaluated to false
    9 | QuantityOf<isq::time> auto time_to_goal(QuantityOf<isq::length> auto distance, QuantityOf<isq::speed> auto speed)
      | ^
/opt/compiler-explorer/libs/mp-units/trunk/src/core/include/mp-units/bits/quantity_concepts.h:64:37: note: because 'QuantitySpecOf<std::remove_const_t<decltype(quantity<derived_unit<second, per<kilo_<metre> > >{{{}}}, double>::quantity_spec)>, struct speed{{{}}}>' evaluated to false
   64 | concept QuantityOf = Quantity<Q> && QuantitySpecOf<std::remove_const_t<decltype(Q::quantity_spec)>, QS>;
 | ^
/opt/compiler-explorer/libs/mp-units/trunk/src/core/include/mp-units/bits/quantity_spec_concepts.h:149:73: note: because 'implicitly_convertible(mp_units::kind_of_<mp_units::derived_quantity_spec<mp_units::isq::time, mp_units::per<mp_units::isq::length> > >{}, struct speed{{{}}})' evaluated to false
  149 |   QuantitySpec<T> && QuantitySpec<std::remove_const_t<decltype(QS)>> && implicitly_convertible(T{}, QS) &&
      | ^
1 error generated.
Compiler returned: 1
```

If those curlies could be collapsed into one pair only, the error message would be much more readable.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVs9u2zgTfxr6MoghkXZsH3xw7Br4Lt82aIAeDYoaWdxSpEqOkriHffYFKTmxUidb9LLYQIkcUUPO78-MR4agjxZxzeZ3bL6byI5q59dN24Ufk8KVp_VDjVA5Y9yTtkfAZ9m0BqEmagMTG8b3jO-PriycoanzR8b3Pxjff30O9deVfc6h9dpSgNagpRO4ClTnzQkKLxUG0BaoRkDvnYcGQ5BHjNtmO5ad_95m_UX4TMMjsQ2u8wqZ-MTEJl8yseEzJjb9RvGDddBIUnVMuuqsIu0sVM6DksYAOWB8QbrBA7nD0UnD-KLfGwDyJbDFFgCUs4HgeyctaToB0RGY2ME4bllLUx0a6SXVzh5KHUhahYxvoZXxvmLi7mVvgLQ3m3_66_XnKqpVBLXssVAkBZS0pS4lIRA2rYkf9NE6j2Vajcl6mdi2jiBI0qHSWAKb3z1pquElNbGRXaRA7F7AMbH9po07MLFtkHzKYXHHFruIo3RdYdIjvoXQYjrw2hYlev2I5aGzmiIcVM6WiQn0107oryvnzHcDY6tE1_1wxB8VE1sdvkeLiE3UgYlPkDJ5I8r1CIP2SPVLzKVW1wMGsMP7_X98dUXNdyVcZpcSFqhkFzC6b3Rg0ybOQn_qBaPjhTf8jheDHu4vrI_Xew2ux7woc3X1rBcMv0mxu0G3_uq98RNvjC8AH6XpJGEZy66SJuArf_8xefnetcT4Xrmm1Qb9DT63xnn0jO-NLgLj-6a96Rnke_Kd_cb4PniVYjwyvtdWma7E8ZtFfzvrflDOKmwpTGsmNrexs4nFP9joS4sqgQtU9uA8Nu4RD6kvHChVpzJ0apHx5e_X7AceGFXwyMiH0KJKnbBvIeQ7RQPf1730o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