最終更新:2021-01-07 (木) 15:46:14 (1197d)
定数式
Top / 定数式
コンパイル時に定数となる変数・関数
constexpr変数
- コンパイル時定数
constexpr関数
- コンパイル時に関数を実行できるようになる
constexpr int square(int x){return x*x}; int ar[square(2)];