Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreasfertig/cppinsights
/ factorial
Function
factorial
tests/ConstexprFunctionHandlerTest.cpp:1–4 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
constexpr int factorial(int n)
2
{
3
return n <= 1? 1 : (n * factorial(n - 1));
4
}
5
6
constexpr float factorialFloat(int n)
7
{
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected