私がやろうとしているのは、2^30 に等しい定数を定義することです (2^34 のようなものに変更する可能性があるため、32 ビットよりも大きな部屋を用意することを好みます)。
次の最小限の (?) 例がコンパイルされないのはなぜですか?
#include <stdint.h>
// test.cpp:4:33: error: expected primary-expression before numeric constant
// test.cpp:4:33: error: expected ')' before numeric constant
const uint64_t test = (uint64_t 1) << 30;
//const uint64_t test1 = (uint64_t(1)) << 30;// this one magically compiles! why?
int main() { return 0; }