New Blog Post: Writing a D Wrapper for a C Library
    ag0aep6g 
    anonymous at example.com
       
    Sun Feb 10 15:33:11 UTC 2019
    
    
  
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.
    
    
More information about the Digitalmars-d-announce
mailing list