[cfe-dev] libc++ std::isfinite() problem
Kal Conley
kcconley at gmail.com
Mon Jan 14 05:25:17 PST 2013
Hi,
I am getting compile errors trying to compile code which tries to do
something equivalent to std::isfinite((int)0). I get:
test.cc:27:3: error: no matching function for call to 'isfinite'
std::isfinite((int)0);
^~~~~~~~~~~~~
/usr/bin/../lib/c++/v1/cmath:376:1: note: candidate template ignored:
substitution failure [with _A1 = int]
isfinite(_A1 __x)
This compiles OK on all versions of libstdc++ that I have tried. Is
libc++'s implementation correct here? Should it be relying on templates
and only allowing specializations that satisfy std::is_floating_point?
Thanks!
Kal
More information about the cfe-dev
mailing list