Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreasfertig/programming-with-cpp20
/ ExpensiveCalculation
Function
ExpensiveCalculation
12.15-asConstant0/main.cpp:4–7 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2
// SPDX-License-Identifier: MIT
3
4
constexpr int ExpensiveCalculation(int base)
5
{
6
return base + 1; // Well, ... expensive
7
}
8
9
int main()
10
{
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected