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

Cheng Wei rivercheng at gmail.com
Thu Sep 29 19:38:06 PDT 2011


Thanks a lot. This solves the problem.

However, it breaks the abstractness. Now in D side, we can call
auto v = ab(). This does not make sense, because then &v cannot be used
in the C library.

I don't understand why when we manipulate AB*, D compiler needs to know
the size of struct ab. Moreover, when we use AB*[int], the D compiler
complains about there's no opHash defined for AB. I don't think they are
necessary at all.


More information about the Digitalmars-d-learn mailing list