Path: ...!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thiago Adams Newsgroups: comp.lang.c Subject: Re: constexpr keyword is unnecessary Date: Sun, 13 Oct 2024 14:39:41 -0300 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <20241013093902.884@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 13 Oct 2024 19:39:41 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b9d5dd9688ffdaba1d061cdfa3066275"; logging-data="822660"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Hq4rTLHCY5+z/hrmM/m/GQ30S0GCWh3A=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:H76JOvwR/WMDRivvN0qq5Oz10jY= In-Reply-To: <20241013093902.884@kylheku.com> Content-Language: en-GB Bytes: 1857 Em 10/13/2024 1:39 PM, Kaz Kylheku escreveu: > On 2024-10-11, Thiago Adams wrote: >> What I am suggesting again is remove the keyword constexpr. make const >> do that. >> >> Just to remember C++ was already like that before constexpr. In c++ >> const could be used as constant expressions. > > Really? > > const int f(int x) { ... } > > says that calls to f can be evaluated at compile time? > I am comparing what C have so far. Only variables not functions. Sample const int s = 4; int a[s]; This was always valid in C++.