|
Boost : |
From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2004-07-29 05:49:01
"Daniel Frey" <daniel.frey_at_[hidden]> wrote
>That's a common problem. You need to declare a function to return the
>temporaries you need, this usually helps:
>template< typename T > T provide();
>template< typename T, typename U >
>typeof( provide<T>() + provide<U>() ) sum(...) {}
I am afraid this doesnt help :(
The following code produces the same "internal compiler error":
template<class T> T make();
template<class T, class U>
typeof(make<T>() + make<U>()) sum(const T& t, const U& u)
{
return t + u;
}
main()
{
sum(5, 3.14);
return 0;
}
Regards,
Arkadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk