MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / GetSize

Function GetSize

01.16-constexprFunctionInConcept0/main.cpp:8–11  ·  view source on GitHub ↗

#A A helper function with a default parameter

Source from the content-addressed store, hash-verified

6
7// #A A helper function with a default parameter
8constexpr auto GetSize(const auto& t = {})
9{
10 return t.size(); // #B Call the size function of the container
11}
12
13// #C A concept which uses T.size
14template<typename T, size_t N>

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected