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