This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
- From: "brakiozor at caramail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2007 10:06:17 -0000
- Subject: [Bug c++/33808] internal compiler error: in write_type, at cp/mangle.c:1651
- References: <bug-33808-15236@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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