Boost logo

Boost :

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()
> {
> f<float>();
> }

So this is the same issue for which we define
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
libs/config/test/boost_no_exp_func_tem_arg.ipp BTW.

Thanks, John.

Boost list run by bdawes at, gregod at, cpdaniel at, john at