On 10.02.19 15:19, Mike Parker wrote:
https://dlang.org/blog/2019/02/10/writing-a-d-wrapper-for-a-c-library/

As far as I see, `context` shouldn't be const.

You cast a const `this` to non-const void* and then "back" to non-const UserIOStream. Then doWriteBytes is called on this seemingly mutable object that's actually const.

If I implement doWriteBytes in a way that mutates the object, I'm violating const.

Reply via email to