Unjustified conflict ( I guess ^^ )

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Dec 19 06:07:07 PST 2007


"funog" <funog at ifrance.com> wrote in message 
news:fkal3f$2utu$1 at digitalmars.com...
>
> I have posted this one on digitalmars.D.bugs, but somehow I feel it wasn't 
> the right place ... dmd1.023 ( can't try with 1.024 or 2.008 as I don't 
> have glibc 2.4 ... it's really sad I can't try the new const/invariant 
> :( ) doesn't compile :
>
>
> void foo(T)(out T[] p)
> {
>        //...
> }
>
> void foo(out int p)
> {
>        //...
> }
>
>
> test.d(7): function test.foo conflicts with template test.foo(T) at 
> test.d(2)
>

As Mr. Brackets explained it's because they're not both templates or both 
functions, but it'll make you happy to know that this is expected to work in 
D2 (eventually, it hasn't been implemented yet but Walter said that it 
would). 





More information about the Digitalmars-d mailing list