digitalmars.D - Cannot overload on constness of a struct
- Janice Caron (10/10) Nov 07 2007 struct A(uint N)
struct A(uint N) { private ubyte[N] data; ubyte * ptr() { return &data[0]; } const const(ubyte) * ptr() { return &data[0]; } } Error: function ptr conflicts with function ptr If A is mutable, then ptr should return a pointer to ubyte. If A is const, then ptr should return a pointer to const ubyte. Please tell me this will work after the revamp of const?
Nov 07 2007