functional.h 425 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2012-2014 Daniele Bartolini and individual contributors.
  3. * License: https://github.com/taylor001/crown/blob/master/LICENSE
  4. */
  5. #pragma once
  6. namespace crown
  7. {
  8. template<typename T>
  9. struct less
  10. {
  11. bool operator()(const T& a, const T& b) const
  12. {
  13. return a < b;
  14. };
  15. };
  16. template <typename T>
  17. struct greater
  18. {
  19. bool operator()(const T& a, const T& b) const
  20. {
  21. return a > b;
  22. };
  23. };
  24. } // namespace crown