MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / main

Function main

12.15-asConstant0/main.cpp:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9int main()
10{
11 auto value1 = ExpensiveCalculation(2); // #A run-time
12 constexpr auto value2 = ExpensiveCalculation(2); // #B compile-time
13
14 //++value2; // #C Doesn't compile, value2 is const
15}

Callers

nothing calls this directly

Calls 1

ExpensiveCalculationFunction · 0.70

Tested by

no test coverage detected