August 23, 2002 Cant deref any typedef | ||||
---|---|---|---|---|
| ||||
Ok here's the real problem with typedefs, and it is not specific to delegates or function pointers. You can't dereference them. this won't compile: pf.d(7): can only * a pointer, not a 'IP' ----------------- typedef int* IP; int main(char argv[][]) { int i = 5; IP ip = (IP) &i; *ip; return 0; } |
August 24, 2002 Re: Cant deref any typedef | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joe Battelle | I've encountered this problem with C++ templates and it can make things difficult. If we can add a reference to a typedef, it stands to reason that we should be able to dereference them as well. -Craig |
Copyright © 1999-2021 by the D Language Foundation