d62_q2a_iterator_check.cpp
cpp
#pragma region student.h
#ifndef __STUDENT_H_
#define __STUDENT_H_
template <typename T>
bool CP::vector<T>::valid_iterator(CP::vector<T>::iterator it) const {
// write your code here
const auto index = it - mData;
return index >= 0 && index < mSize;
}
#endif
#pragma endregion student.hSee on GitHub
Last Updated: 15/1/2567 13:25:21 (UTC+7)