_relops_cont.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. // This is an implementation file which
  2. // is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
  3. // setting
  4. #if !defined (_STLP_EQUAL_OPERATOR_SPECIALIZED)
  5. _STLP_TEMPLATE_HEADER
  6. inline bool _STLP_CALL operator==(const _STLP_TEMPLATE_CONTAINER& __x,
  7. const _STLP_TEMPLATE_CONTAINER& __y) {
  8. return __x.size() == __y.size() &&
  9. equal(__x.begin(), __x.end(), __y.begin());
  10. }
  11. #endif /* _STLP_EQUAL_OPERATOR_SPECIALIZED */
  12. _STLP_TEMPLATE_HEADER
  13. inline bool _STLP_CALL operator<(const _STLP_TEMPLATE_CONTAINER& __x,
  14. const _STLP_TEMPLATE_CONTAINER& __y) {
  15. return lexicographical_compare(__x.begin(), __x.end(),
  16. __y.begin(), __y.end());
  17. }
  18. _STLP_RELOPS_OPERATORS( _STLP_TEMPLATE_HEADER , _STLP_TEMPLATE_CONTAINER )
  19. #if defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
  20. _STLP_TEMPLATE_HEADER
  21. inline void _STLP_CALL swap(_STLP_TEMPLATE_CONTAINER& __x,
  22. _STLP_TEMPLATE_CONTAINER& __y) {
  23. __x.swap(__y);
  24. }
  25. #endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */