Why is this?
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 5 23:07:51 PDT 2016
I have weird thing:
template E(F){
enum E {
K = F(1)
}
}
struct S(F = float, alias e_ = E!double.K) {}
S!float x; // Error: E!double.K is used as a type
alias T = E!double.K;
struct S2(F = float, alias e_ = T) {}
S2!float y; // alias makes it okay...
struct S3(F = float, alias e_ = (E!double.K)) {}
S3!float z; // just putting parens make it okay as well... wat!?
This can't be right... right?
No problem if E is not a template.
More information about the Digitalmars-d
mailing list