|
|
|
|
|
by tlb
1168 days ago
|
|
Indeed, it fails if you invoke UB. For example, an int overflow in a constexpr causes a compile error: <source>:5:17: error: static assertion expression is not an integral constant expression
static_assert(1024*1024*1024*3 != 0, "UB");
https://godbolt.org/z/Wc591En7E |
|
Edit: small correction so that the numbers are big enough to cause problems...