<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/83695>83695</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[[nodiscard]] on numeric_limits functions
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
beached
</td>
</tr>
</table>
<pre>
Would it be welcome to others to add `[[nodiscard]]` to the static methods on `numeric_limits`. It would help point out bugs like
```cpp
if( lhs == std::numeric_limits<T>::min( ) and rhs == T{ -1 } ) {
std::numeric_limits<T>::max( ); /* oops, ignored it */
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMUsuOnDAQ_Jrm0tqRsXn5wGFmyUi5r5RjZOxmcGJshE02-fvIMNIqe4rU4lVUdXe5VIz24Yl6qG9QD4Xa0xy2fiSlZzLFGMyf_lvYnUGbcCR8J6fDQpgChjTTFvOTMgahYYfEzQdjo1abgXrI1bD8S5oJY1LJalwozcFEDD6T_L7QZvV3ZxebIjTsgohfE74fTWdyK67B-oRhTzjuj4jO_iQENgC7Pq8NO0uv6_nFTsA7dHNEEAOIAWMyIK4grp_aidc3EF9OaLE-s4BLVN7g9sF-g_aGLyVCOxwwtLezD_6fsPr9FAZxQ-B34FcMYY3AX9E-fNjosBf4NYPnTu3wabnztTC9MFJIVVBftkxWpey6upj7qhOm6bSWU00TK1sywijJ9FS3jPGRFbbnjFdMMM55XfL60smyFLKT1ThVktUjVIwWZd3FuV_LJWyPwsa4U9-JRtaFUyO5eMSEc0_veIDAeU7N1mfOSz4eqJizMcUPlWSTe-brczhyBv41Dqfd62SDj8W-uX5OaY3ZxWza_WHTvI8XHRbg96z_vL2sW_hBOgG_H1NF4Pdj6r8BAAD__4e93Ds">