This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug with template and typeof


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]