This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bug with template and typeof
- To: <egcs-bugs at cygnus dot com>
- Subject: Bug with template and typeof
- From: "Philippe PRADOS" <pprados at club-internet dot fr>
- Date: Wed, 1 Apr 1998 16:58:02 +0200
I find a bug when combine template and typeof. Test this code :
template <class L,class R>
struct Xplus
: binary_function<promote_traits<L,R>::promote, L, R>
{ typeof(x + y) operator()(const L& x, const R& y) const { return x + y; }
};
int main()
{
Xplus<int,int> op;
op(1,1);
}
Generate :
(C:\util\Cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\egcs-2.90.27\cc1pl
us.exe 1095) Exception: STATUS_ACCESS_VIOLATION