On Tuesday 03 April 2007 18:34:02 Shawn Anderson wrote:
> After a little more testing, I found that this all compiles fine on my
> gentoo box, using gcc 3.2,3.3,3.4.6.
> The way you are using templates does compile on OS X gcc 4.0, but not 3.3.
> Could this be an OS X version of gcc issue?
>
> Either way, even if it compiles...
>
> updateGlobalGradientSlow(Uint8 *gradient)
> {
> if (size <= 65536)
> updateGlobalGradientSlow<Uint16>(gradient);
> else
> updateGlobalGradientSlow<Uint32>(gradient);
> }
>
> seems like a very strange and counter-intuitive way of using templates.
> Was there a specific reason that it was changed to use templates vs using
> two methods?
template is much better than two methods as it doesn't duplicate code.
This is a perfectly correct use of templates.
Steph
--
http://nct.ysagoon.com
_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel