mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08: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:
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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user