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

Function main

12.16-asConstant1/main.cpp:14–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14int main()
15{
16 auto value2 = as_constant(ExpensiveCalculation(2)); // #B compile-time
17
18 ++value2; // #C Compiles
19}

Callers

nothing calls this directly

Calls 2

as_constantFunction · 0.85
ExpensiveCalculationFunction · 0.70

Tested by

no test coverage detected