Sujet : Re: C23 thoughts and opinions
De : already5chosen (at) *nospam* yahoo.com (Michael S)
Groupes : comp.lang.cDate : 23. May 2024, 13:43:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240523154331.000063da@yahoo.com>
References : 1 2 3
User-Agent : Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
On Wed, 22 May 2024 22:11:44 +0200
David Brown <
david.brown@hesbynett.no> wrote:
I will definitely use that. Sometimes I want a constant expression
for things like array sizes or static initialisers, and want to
calculate it. constexpr gives you that without having to resort to
macros.
I don't say that everything that can be done with C23 constexpr can be
done with enum, but for uses like ones you mentioned above, 90%
probably can be done with enum.