Sujet : constexpr keyword is unnecessary
De : thiago.adams (at) *nospam* gmail.com (Thiago Adams)
Groupes : comp.lang.cDate : 11. Oct 2024, 13:25:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <veb5fi$3ll7j$1@dont-email.me>
User-Agent : Mozilla Thunderbird
I think constexpr keyword is unnecessary.
Anything you do with it could/should be done with const.
Even without const , one object like (struct point){.x=1, .y=0} is a constant in my view.
So, for instance, no need for (constexpr struct point){.x=1, .y=0} here.
The VLA could have been the motivation for a new keyword, but I don’t think it matters.
On the other hand, (static struct point){.x=1, .y=0} makes sense.
If constexpr were "no-storage" I think it would make sense but it is not.