From: Ben S. <bs...@ia...> - 2003-03-31 01:20:31
|
You are right. makeInverse() shouldn't need Type2Type. The only reason I can think of that it might be there would be to work around a VC7 compile error. However, I'm pretty sure that's not the case since I'm not seeing that in the CVS log. I give you the green light on removing the Type2Type. When you do though, make sure you modify the src argument to pass by const reference rather that const value. (I just noticed that error ...) cheers, -Ben Patrick Hartling wrote: > Is there a reason that gmtl::makeInverse() (lines 1064-1070 of > Generate.h) uses the Type2Type idiom? Just from looking at it, it seems > like there can be no ambiguity relating to overloading because the > return type always matches the parameter type. Am I missing something? > > -Patrick > > > P.S. I ask because the Type2Type thing doesn't work at all in languages > without generics (at least AFAICT), and the fewer places I have to write > wrappers, the better. > > |