From: John Maddock (john_at_[hidden])
Date: 2007-10-12 04:31:36
Simon Atanasyan wrote:
> 2007/10/11, John Maddock <john_at_[hidden]>:
>> Simon Atanasyan wrote:
>>>> The gcc results on that platform are pretty good, so it seems a
>>>> shame not to support Sun as well, anyone have ideas?
>>> Probably this is a bug in Sun C++. I will take a look on it.
>> Thanks Simon, if there's a workaround possible for the existing Sun
>> releases that would be great.
> Good news - the latest version of Sun C++ works good. This version of
> the compiler even does not need "Sun related" workaround in the
> boost/math/concepts/real_concept.hpp (lines 334-338).
> Bad news - all other version of Sun C++ have a bug. Compiler cannot
> deduce a type of template parameter for the template specialization
> based on function return type. Here is test case for this bug:
> A possible workaround is to add unused argument that helps compiler to
> handle template specialization: Following code works good:
> template <class T>
> T f(T* = 0)
> return T();
> template <>
> float f(float*)
> return 1.0;
> int main()
So this is the same issue for which we define
BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS and associated workarounds?
If so which versions of __SUNPRO_CC should we define it for? Strangely the
config tests don't pick this up: the test case is