<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57703>57703</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang fails to compile `std::ranges::remove_if`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pubg-hacks
</td>
</tr>
</table>
<pre>
the following simple code fails to compile with clang (15, 14, 13, 12, ..) but compiles with gcc and msvc:
```
#include <vector>
#include <algorithm>
void test_remove_if() noexcept
{
std::vector<int> vec;
std::ranges::remove_if(vec, [](int v) { return !v; });
}
```
code on godbolt: https://godbolt.org/z/xd5Yd5rE8
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFUcGOmzAQ_RpzsRYZG0M4-JBNdv-hp5XBE3BrMLIN2fbrO5BEW7WRiszg5xm_ebxpvfmp0gD04p3zVzv1NNpxdkA7b_BUWxdp8ojG2eLp1aaBdk5jHeGHQhJ-okW5R7FHvsU8J7yh7ZIe9-LtYt91VE-GjnHtiDgSdibsESt2XzfIhZ06t6AGIk4rdMkHIt6eJbXrfUD28Su_x9VbQxPE9BFg9Ct82AtK3oRNHj47mNO9un69bSg-MZlNmDg-Wp7slJCYIibiWWFALyDe93802i6gFUS-EnlGjDx03bpjPxogLWFCC4sVWfEIK5qdv3mIOj_3ZY_7bPxEe29a71DfkQ4pzbsK_o7rnsh96BH9wvfTyG9GhrfDjSEDVVSVYEzWVZ0ZJUwjGp0lmxyo23z_mT2K-M9fVyxbglN_acHZLG2OLAicWx-flzn47-gyQhvjgmz8XdY1E9mgtCwBWiMunLFSGhCyFLq4VI0W8nDRVeZ0Cy6qzV3OJ7jSnQL3aHZmFWecs6bgxYHxss6BA-taaLvayI2QlAxG_L1807GZlAW1S2qXPmLS2ZjiV1LHaPsJQN2GmeklDT6oeWn7l0F3P2K2d1e7-t-MJ_1h">