On 2/15/2016 10:04 PM, Jonathan M Davis wrote:
Straight up head-const is utterly useless IMHO. That's what Java has. C++ has something far more complicated where any individual piece (or pieces) of a pointer type can be declared const without necessarily making the whole thing const. So, _that_ is what we'd need to interact with C++, and it's a downright ugly feature IMHO.
That's right. 'headconst' cannot be just a storage class, it has to be a type constructor.
You're right that mangling is the big issue with C++ interoperability in regards to const.