[Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
brakiozor at caramail dot com
gcc-bugzilla@gcc.gnu.org
Fri Oct 19 10:06:00 GMT 2007
------- Comment #5 from brakiozor at caramail dot com 2007-10-19 10:06 -------
yes, one of the way is to pass by an intermediate template type...
(I found it on the web)
but the compiler error could(and should) be fixed
#define TPL_TYPEOF_MUL(A,B) typename typeof_mul<A,B>::type
#define TYPEOF_MUL(A,B) typeof_mul<A,B>::type
template <typename A, typename B>
struct typeof_mul
{
typedef typeof(A()*B()) type;
};
template <class Tx, class Ty>
Y<TPL_TYPEOF_MUL(Tx,Ty)> operator *(X<Tx>& x, const Ty& y)
{
Y<TPL_TYPEOF_MUL(Tx,Ty)> res(x);
//res *= y;
return res;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33808
More information about the Gcc-bugs
mailing list