const member function
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 23 03:04:31 PST 2015
On Mon, 23 Feb 2015 09:12:33 +0000, rumbu wrote:
> On Saturday, 21 February 2015 at 15:26:28 UTC, ketmar wrote:
>> On Sat, 21 Feb 2015 08:27:13 +0000, rumbu wrote:
>>
>>> My question was not how I do this, I know already. My question was if
>>> there is another way to safely call a non-const instance function on a
>>> const object.
>>
>> is there a way to been safely hit by a truck?
>
> I thought if there is some language construct similar to @trusted for
> @safe, applicable to const member functions. You can be safely hit by a
> truck if I tell you that there is no truck around :)
do not make it `const` at all. i see something very strange in making
something `const` just to find the way to remove constness. just stop
writing C++ code in D.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150223/2154af18/attachment.sig>
More information about the Digitalmars-d-learn
mailing list