Need size of rightmost array, not type...
Ary Manzana
ary at esperanto.org.ar
Wed Feb 21 18:59:21 PST 2007
This compiles fine:
----------------------------------------
template Foo() {
const int Foo = 3;
}
void one() {
int x = Foo!();
char[] buf = new char[x];
}
----------------------------------------
However this:
----------------------------------------
template Foo() {
const int Foo = 3;
}
void two() {
char[] buf = new char[Foo!()];
}
----------------------------------------
main.d(6): need size of rightmost array, not type Foo!()
Why?
More information about the Digitalmars-d
mailing list