const(Class) is mangled as Class const* const

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 27 15:04:55 PDT 2017


On 3/27/2017 1:41 PM, kinke wrote:
> Unfortunately, it's almost always the other way around - D code trying to
> interop with one of the gazillions existing C++ libs, and nobody wants to
> maintain his own fork with D-compatible glue interfaces. How often did you use
> `const T *const` vs. `const T *` in your C++ headers? ;) I think this would be a
> tiny change for D, breaking almost no code and well worth the reduction in
> required 'flexibility on the C++ side'.

It's made to work with:

    const T

which is the norm with C++ templates.



More information about the Digitalmars-d mailing list