[Patch] Use __builtin_clz* for __lg
Jonathan Wakely
jwakely.gcc@gmail.com
Thu Oct 25 22:06:00 GMT 2007
On 24/10/2007, Joe Buck <Joe.Buck@synopsys.com> wrote:
>
> Your "specializations" aren't specializations, but ordinary functions.
> I'm not sure whether this matters in practice, though.
>
> That is, you define __lg(int), not __lg<int>(int).
>
> I guess this might matter when __lg is called from a template. This
> is an area of the standard that I am often a bit confused by, though.
It would matter if they were called as __lg<T> but they're only used
by the library code and it doesn't do that, so the non-templates are
in the overload set and work as intended.
Jon
More information about the Libstdc++
mailing list