Too late.

C++23 got really const: 

https://www.kdab.com/cpp23-will-be-really-awesome/
 

-----Ursprüngliche Nachricht-----
Von: Thiago Macieira via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: Mo 22.05.2023 20:55
Betreff: Re: [std-proposals] Alteration of elements in a set (non-const iterator)
An: std-proposals@lists.isocpp.org; Edward Catmur <ecatmur@googlemail.com>;
CC: Thiago Macieira <thiago@macieira.org>;
On Monday, 22 May 2023 11:18:45 PDT Edward Catmur wrote:
> I've been meaning to ask for a [[really_const]] attribute for a while.
>
> It shouldn't be necessary (per the standard, implementations might want to
> add it anyway).

That's for the first case I pasted, where the sub-object isn't a const object,
but we called a const member function. It is allowed to const_cast and modify
the object, because the object isn't const.

I want an attribute to say "no, really, I promise not to const_cast".

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Software Architect - Intel DCAI Cloud Engineering



--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals