9 lines
257 B
C++
9 lines
257 B
C++
#include <iostream>
|
|
constexpr int square(int value) { return value * value; }
|
|
int main() {
|
|
constexpr int result = square(7);
|
|
const int limit{12};
|
|
static_assert(result == 49);
|
|
std::cout << "square=" << result << " limit=" << limit << '\n';
|
|
}
|