Deutsch   English   Français   Italiano  
<20240523154331.000063da@yahoo.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: C23 thoughts and opinions
Date: Thu, 23 May 2024 15:43:31 +0300
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20240523154331.000063da@yahoo.com>
References: <v2l828$18v7f$1@dont-email.me>
	<00297443-2fee-48d4-81a0-9ff6ae6481e4@gmail.com>
	<v2lji1$1bbcp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 23 May 2024 14:43:23 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="65285ad7961782d3c0ffb469858810a7";
	logging-data="1819128"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18kDe/Cj//r67X72F4jUZJUVHPzL2krwMc="
Cancel-Lock: sha1:s2MVes7wdCZ4teIXfil9li4Vi2c=
X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
Bytes: 1551

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.