We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 567e3e6 commit e302ad5Copy full SHA for e302ad5
source/expressions.tex
@@ -6866,9 +6866,9 @@
6866
int y;
6867
const int a = std::is_constant_evaluated() ? y : 1; // dynamic initialization to 1
6868
double z[a]; // ill-formed: "a" is not "usable in constant expressions"
6869
-const int b = std::is_constant_evaluated() ? 2 : y; // static initialization to 2
+const int b = std::is_constant_evaluated() ? 2 : y; // static initialization to 2
6870
int c = y + (std::is_constant_evaluated() ? 2 : y); // dynamic initialization to y+y
6871
-
+
6872
constexpr int f() {
6873
const int n = std::is_constant_evaluated() ? 13 : 17; // n == 13
6874
int m = std::is_constant_evaluated() ? 13 : 17; // m might be 13 or 17 (see below)
0 commit comments