Why an abstract pointer cannot be used as value in an associate array?

bearophile bearophileHUGS at lycos.com
Wed Sep 28 22:39:20 PDT 2011


Cheng Wei:

> extern(C) {
>     struct ab;
> }
> 
> ab*[int] map;
> 
> void main() {
>     map.clear();
> }
> 
> 
> Cannot be compiled. Why?

It's not specific of associative arrays:

extern(C) {
    struct AB;
}
AB*[] arr;
void main() {
    arr.length += 1;
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list