fullyQualifiedName fails on template
"Øivind"
oivind.loe at gmail.com
Thu Jan 23 18:20:07 PST 2014
Is fullyQualifiedName supposed to work on templates? The
following fails:
struct MsgPack(T ...) {
}
struct TestPoint {
float x, y;
}
alias TestPack = MsgPack!TestPoint;
void main() {
import std.traits;
import std.stdio;
//writeln(fullyQualifiedName!TestPack); //Fails
writeln(fullyQualifiedName!(MsgPack!TestPoint)); //Fails
}
with error:
/opt/compilers/dmd2/include/std/traits.d(340): Error: forward
reference of variable parentPrefix
/opt/compilers/dmd2/include/std/traits.d(501): Error: template
instance
std.traits.fullyQualifiedNameImplForSymbols!(MsgPack!(TestPoint))
error instantiating
/opt/compilers/dmd2/include/std/traits.d(292):
instantiated from here:
fullyQualifiedNameImplForTypes!(MsgPack!(TestPoint), false,
false, false, false)
/d112/f728.d(19): instantiated from here:
fullyQualifiedName!(MsgPack!(TestPoint))
/opt/compilers/dmd2/include/std/traits.d(292): Error: template
instance
std.traits.fullyQualifiedNameImplForTypes!(MsgPack!(TestPoint),
false, false, false, false) error instantiating
/d112/f728.d(19): instantiated from here:
fullyQualifiedName!(MsgPack!(TestPoint))
/d112/f728.d(19): Error: template instance
std.traits.fullyQualifiedName!(MsgPack!(TestPoint)) error
instantiating
More information about the Digitalmars-d
mailing list