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

Method find

Exercises/NoModules/Chapter 17/Soln17_06/SparseArray.h:70–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69template<typename T>
70const T* SparseArray<T>::find(size_t index) const
71{
72 for (auto& pair : m_values)
73 {
74 if (pair.first == index)
75 return &pair.second;
76 }
77 return nullptr;
78}
79
80template<typename T>
81T* SparseArray<T>::find(size_t index)

Callers 5

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected