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

Function PrintSorted

01.40-printSorted0/main.cpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10template<typename T>
11void PrintSorted(T c) // #A By copy to be able to sort it
12{
13 std::sort(c.begin(), c.end());
14
15 for(const auto& e : c) { std::cout << e << ' '; }
16
17 std::cout << '\n';
18}
19
20void sortedVector()
21{

Callers 2

sortedVectorFunction · 0.70
sortedListFunction · 0.70

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected