Liste des Groupes | Revenir à cl c |
Thiago Adams <thiago.adams@gmail.com> writes:Em 10/19/2024 6:48 PM, Keith Thompson escreveu:For instance, in file scope,
>
const int a = 1;
constexpr int b =1;
>
In both cases, because it is file scope, a and b need to be
initialized with constant expressions. I don´t see anything more
special in b compared with a to make any distinction.
As of C23, you're right. But what if a future C standard allows
non-constant initializers for file-scope object (as C++ already does)?
Les messages affichés proviennent d'usenet.