This is the mail archive of the
mailing list for the libstdc++ project.
Re: TR1 Math tarball
Finally, I do have some issue with using std::tr1::mathfunction. I
put guards around but where is _GLIBCXX_USE_C99_MATH_TR1 defined? I'd
like to fix this.
Really, it's easy, very easy, compared to other parts of this work you
are doing. The configury machinery already takes care of definining or
not those macros, which you have only to use, exactly the same way
tr1::random already does, for example (see, for example,
std::tr1::lgamma in random.tcc, poisson_distribution<>::operator()). The
rule is simple: whenever you use a C99 function mandated by TR1, you
cannot assume it's available on the platform, instead use it protected
by _GLIBCXX_USE_C99_MATH_TR1, and then, of course from std::tr1:: If an
alternate algorithm avoiding the function isn't available, then, just
punt for now, the facility will not be available for those targets (the
testcases will be also wrapped in _GLIBCXX_USE_C99_MATH_TR1, of course).