|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++ - Bug? Member Template Support
Hi, Here's an obscure bug. My understanding is that the code is Standard C++. I get Internal error: exp2 1229 when a member function ptr is passed as a non type template argument to a member template. However when a member function ptr is passed as a non type template argument to a global template function, things work fine. Code attached. Best Regards, Anand. Apr 27 2007
Anand Krishnamoorthi wrote: Apr 27 2007
Hi,
Code follows this mail.
Best Regards,
Anand.
-------------------------------------------
struct S {
template< typename Derv, void (Derv::*PF)() >
void thunk();
};
struct Derv : S {
void func() {}
};
template< typename Derv, void (Derv::*PF)() >
void thunk();
void test_func()
{
&S::thunk< Derv, &Derv::func >;
&thunk< Derv, &Derv::func >;
}
Apr 28 2007
Walter Bright skrev:Anand Krishnamoorthi wrote: Apr 28 2007
|