Re: [Stlport-devel] template function: what compiler NOT support it?
Brought to you by:
complement
From: <fra...@fr...> - 2006-04-03 19:41:26
|
I agree, explicit template function instanciation is not widely portable even if there are some in current STLport that I never afford to remove. Uli solution is good. Bests Ulrich Eckhardt wrote: > On Friday 31 March 2006 19:13, Petr Ovtchenkov wrote: > >> Can anybody say, what compiler (primary, that potentially work >> with current STLport) don't understand following program? >> >> template <class A, class B> >> A f() >> { >> return A(); >> } >> > > As already said, MSC12 compilers (eVC3?, eVC4, VC6) compile this but produce > bogus code. The workaround is to add the template parameters to the function > signature: > > template <class A, class B> > #if defined(_MSC_VER) && _MSC_VER<1300 > A f( A const* unused1=0, B const* unused2=0) > #else > A f() > #endif > { > return A(); > } > > Uli > > **************************************************** > Visit our website at <http://www.domino-printing.com/> > **************************************************** > This Email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this Email in error please notify the system manager. > > This footnote also confirms that this Email message has been swept by MailSweeper for the presence of computer viruses. > **************************************************** > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Stlport-devel mailing list > Stl...@li... > https://lists.sourceforge.net/lists/listinfo/stlport-devel > > > |