<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86854>86854</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
We could instead implement a custom type that calls the user-provided operation in its `operator+`, and then always call `operator+`. This would get rid of these macros and special casing for known operators.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ldionne
</td>
</tr>
</table>
<pre>
We could instead implement a custom type that calls the user-provided operation in its `operator+`, and then always call `operator+`. This would get rid of these macros and special casing for known operators.
Can be done in a follow-up.
_Originally posted by @ldionne in https://github.com/llvm/llvm-project/pull/66968#discussion_r1541578395_
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzckr-OnDwUxZ_GNFeLjMEMLij2j2i_5pNSrgy-AzcxNvI1O5q3j2Cyilap0oYCS_Y9R8c_H8tMc0DshX4R-q2we15i6r2jGAIWY3T3Hr583xCmuHsHFDijdUDr5nHFkMHCtHOOK-T7hpAXm2Gy3jPkBWFnTE9bih_k0EHcMNlMMQAFoMwgWvnYi0moF9FKoV7BBndoA1h_s3c-3f6cLOH_hRhuZ6oZMyRyEK-HkhFWO6XIpxVvOJH1MFmmMMM1JvgR4i3Apx-XQr4J-fz4v9oAI4KLAY-UFq7R-3h72rcvY-__JZopWO_vsEXO6GC8g2jkL4iHdsl5Y1E_CzUINcyUl30sp7gKNXj_8bkceL7jlIUatt17oYa2NW0nVO2Ip52ZYnhPlW4qfelqo98fAaBwfe1MbWyBfXWpKt1q03bF0remnqpmVFe0xqhmbC6NqSxK1elaSW0K6pVUjazVpeq0UV3ppDEXbWo0k3S1k6KRuFry5ZGvjGkuiHnHvms73RTejuj57I5SAW9wHgqljiql_rzTuM98wCDO_NslU_bY_9tdKvbk-79--RMhCzWciH8GAAD__4vkMrA">