From: Daniel James (daniel_at_[hidden])
Date: 2005-04-19 13:00:21
Hubert Holin wrote:
> Do we have some template metamagic to see if a given function
> signature is available? I had intended to test computation accuracy for
> some select values and compare with epsilon for that type (could still
> use it to check for QOI anyway...).
You can see my crude attempt at this at:
I use the return type of the function to tell which overload was called.
It's a bit odd on Solaris though, as both GCC and the Sun compiler seem
to have the standard overloads, but my tests fail on GCC which suggests
that the GCC long double overload doesn't have the full accuracy.
Anyway, the following might be what you want. But I think some config
macros, with good test cases, would be better.
boost::type_traits::yes_type is_long_double(long double);
const bool has_long_double_frexp
= sizeof(is_long_double(std::frexp((long double) 0.0, 1)))
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk