MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / swap

Function swap

Exercises/Modules/Chapter 11/Soln11_04/internals.cpp:5–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import words; // For use of words::Words
4
5void swap(words::Words& words, size_t first, size_t second)
6{
7 auto temp{ words[first] };
8 words[first] = words[second];
9 words[second] = temp;
10}
11
12size_t max_word_length(const words::Words& words)
13{

Callers 1

sortFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected