cpp_binder, a not-yet-useful tool for generating C++ bindings
Kagamin via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Tue Sep 22 08:53:20 PDT 2015
On Tuesday, 22 September 2015 at 15:33:40 UTC, Ola Fosheim
Grøstad wrote:
> On Tuesday, 22 September 2015 at 15:11:55 UTC, Kagamin wrote:
>> Another C feature you didn't know about: the standard allows
>> to create a mutable pointer to const data and mutate it.
>
> I didn't? Of course I did. In C++ other threads can write to
> const objects. The function receiving a const objects is not
> supposed to write to const. Const cast is supposed to be used
> for calling legacy const interfaces without a const signature.
Of course you didn't. In C you can mutate const object without
cast. But it's not an issue because it's not what is usually done
and usually const works as expected.
More information about the Digitalmars-d-announce
mailing list