Mixining templates having functions with the same name
Victor Nakoryakov
nail-mail at mail.ru
Sun Apr 2 03:35:05 PDT 2006
Hello,
Consider snipet:
template T1()
{
void myproperty(real x) // line X
{
...
}
}
template T2()
{
real myproperty() // line Y
{
return ...;
}
}
class C(alias M1, alias M2)
{
mixin M1!();
mixin M2!();
...
}
...
auto c = new C!(T1, T2)
...
Compilation of course gives an error: 'myproperty on line X conflicts
with myproperty on line Y', this is expected dmd behaviour.
But in this case I know what I do. So who know elegant solution do
disambigue instanciation?
--
Victor (aka nail) Nakoryakov
nail-mail<at>mail<dot>ru
Krasnoznamensk, Moscow, Russia
More information about the Digitalmars-d
mailing list