mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 20:54:41 +03:00
Fix args. of == and != operators in C.100 (#1359)
Obviously, the comparisons are intended to compare `Sorted_vector`s, not `T` values
This commit is contained in:
committed by
Sergey Zubkov
parent
5190ea51a3
commit
4f97d37239
@@ -6599,8 +6599,8 @@ In particular, `std::vector` and `std::map` provide useful relatively simple mod
|
||||
std::vector<T> rep; // use a std::vector to hold elements
|
||||
};
|
||||
|
||||
template<typename T> bool operator==(const T&);
|
||||
template<typename T> bool operator!=(const T&);
|
||||
template<typename T> bool operator==(const Sorted_vector<T>&, const Sorted_vector<T>&);
|
||||
template<typename T> bool operator!=(const Sorted_vector<T>&, const Sorted_vector<T>&);
|
||||
// ...
|
||||
|
||||
Here, the STL style is followed, but incompletely.
|
||||
|
||||
Reference in New Issue
Block a user