less.cpp 705 B

1234567891011121314151617181920212223242526272829
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/assert.hpp>
  5. #include <boost/hana/ext/std/ratio.hpp>
  6. #include <boost/hana/less.hpp>
  7. #include <boost/hana/not.hpp>
  8. #include <ratio>
  9. namespace hana = boost::hana;
  10. int main() {
  11. BOOST_HANA_CONSTANT_CHECK(hana::less(
  12. std::ratio<1>{},
  13. std::ratio<3>{}
  14. ));
  15. BOOST_HANA_CONSTANT_CHECK(hana::less(
  16. std::ratio<4, 10>{},
  17. std::ratio<3, 5>{}
  18. ));
  19. BOOST_HANA_CONSTANT_CHECK(hana::not_(hana::less(
  20. std::ratio<3, 5>{},
  21. std::ratio<4, 10>{}
  22. )));
  23. }