Dredd still mutates some forms of variables that should have a constant initializer. This is demonstrated when applying Dredd to the following example:
int main() {
[[clang::require_constant_initialization]] static int x = __dredd_replace_expr_int_zero(0, 0);
}
This gives:
// Dredd Prelude ...
int main() {
[[clang::require_constant_initialization]] static int x = __dredd_replace_expr_int_zero(0, 0);
}
Although Dredd doesn't currently support C++ 20, I suspect the same issue would arise with constinit.
Dredd still mutates some forms of variables that should have a constant initializer. This is demonstrated when applying Dredd to the following example:
This gives:
Although Dredd doesn't currently support C++ 20, I suspect the same issue would arise with
constinit
.