Sujet : Re: constexpr - C23 thoughts and opinions revisited
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.cDate : 16. Oct 2024, 13:25:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <veobbv$28j4b$1@raubtier-asyl.eternal-september.org>
References : 1 2
User-Agent : Mozilla Thunderbird
Am 16.10.2024 um 13:54 schrieb Thiago Adams:
I used to think, why execute code at compile time when it always yields the same result? Wouldn't it be better to just leave the result pre- calculated, avoiding slower compilation times and unnecessary compiler complexity?
Also the noise.
The code is easy to read, no matter if you make it constexpr
or const. The language designers don't see the catastrophes
you see with constexpr.