Sean Eskapp: > Nevermind, I realized it's because constness is transitive in pointers. A > const > struct with a pointer member has a const pointer member, and those can't be > implicitly cast to non-const pointer members.
Uhm, the struct having a pointer is not important. In theory this too can't compile: struct Bar {} void foo(Bar b) {} void main() { const b = Bar(); foo(b); } Is this another compiler bug? Bye, bearophile