[libcxx-commits] [libcxx] [libc++][math] Fix acceptance of convertible types in `std::isnan()` and `std::isinf()` (PR #98952)

Danial Klimkin via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 2 03:36:27 PDT 2024


dklimkin wrote:

I ran into some pre-existing code that got broken by this change. Original version was 
```
std::vector<double> foo;
return std::find_if_not(std::begin(foo), std::end(foo), std::isnan<double>);
```

Now the templated version is gone, and std::isnan(double) seems to be have `int` return value, breaking the call above with "Candidate template ignored: couldn't infer template argument '_Predicate'".

Does this work as intended?

https://github.com/llvm/llvm-project/pull/98952


More information about the libcxx-commits mailing list