MCPcopy 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
4consteval auto as_constant(auto v)
5{
6 return v;
7}
8
9constexpr int ExpensiveCalculation(int base)
10{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected