separate stack hpp and stack tpp

This commit is contained in:
hugogogo
2022-07-01 12:52:57 +02:00
parent ef70cc5938
commit de5f718d0c
3 changed files with 99 additions and 51 deletions

View File

@@ -461,36 +461,37 @@ VT_TPL void VT::
* non-member functions :
************************/
// operator == -------------------------------
VT_TPL
bool operator== (const VT & lhs, const VT & rhs) {
VT_TPL bool
operator== (const VT & lhs, const VT & rhs) {
if (lhs.size() != rhs.size())
return false;
return ft::equal(lhs.begin(), lhs.end(), rhs.begin());
}
// operator < --------------------------------
VT_TPL
bool operator< (const VT & lhs, const VT & rhs) {
VT_TPL bool
operator< (const VT & lhs, const VT & rhs) {
return ft::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
}
// operator != -------------------------------
VT_TPL
bool operator!= (const VT & lhs, const VT & rhs) { return !(lhs == rhs); }
VT_TPL bool
operator!= (const VT & lhs, const VT & rhs) { return !(lhs == rhs); }
// operator <= -------------------------------
VT_TPL
bool operator<= (const VT & lhs, const VT & rhs) { return !(lhs > rhs); }
VT_TPL bool
operator<= (const VT & lhs, const VT & rhs) { return !(lhs > rhs); }
// operator > --------------------------------
VT_TPL
bool operator> (const VT & lhs, const VT & rhs) { return (rhs < lhs); }
VT_TPL bool
operator> (const VT & lhs, const VT & rhs) { return (rhs < lhs); }
// operator >= -------------------------------
VT_TPL
bool operator>= (const VT & lhs, const VT & rhs) { return !(lhs < rhs); }
VT_TPL bool
operator>= (const VT & lhs, const VT & rhs) { return !(lhs < rhs); }
// swap (vector) -------------------------------
VT_TPL
void swap (VT & lhs, VT & rhs) { lhs.swap(rhs); }
VT_TPL void
swap (VT & lhs, VT & rhs) { lhs.swap(rhs); }
} // namespace ft
#undef VT
#undef VT_TPL