Liste des Groupes | Revenir à cl c |
Em 10/13/2024 1:39 PM, Kaz Kylheku escreveu:For local variables the constness can be casted away in C++.On 2024-10-11, Thiago Adams <thiago.adams@gmail.com> wrote:I am comparing what C have so far. Only variables not functions.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?
>
Sample
const int s = 4;
int a[s];
This was always valid in C++.
Les messages affichés proviennent d'usenet.