Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ isOdd
Function
isOdd
Examples/NoModules/Appendix A/ExA_12/ProperMath.h:10–10 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
8
9
enum class Oddity { Even, Odd };
10
inline bool isOdd(int x) { return x % 2 != 0; }
11
inline auto getOddity(int x) { return isOdd(x) ? Oddity::Odd : Oddity::Even; }
12
13
#endif
Callers
1
getOddity
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected