blob: 91edf615321b7bd936f3ed543fc27ea87098a225 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
enum EWithHeader {
HOne /* "one" */,
HTwo,
HThree,
};
constexpr unsigned EvalValue(unsigned r, unsigned d) {
while (r >= 50) {
r *= d;
}
return r;
}
// enumeration with values that depend on the preprocessor, architecture and constexpr function evaluation
enum class ENontrivialValues {
A = __LINE__,
B = EvalValue(1522858842, 13),
C,
D = sizeof(int*[A][C]),
};
|