group.cpp 684 B

123456789101112131415161718192021222324
  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/concept/group.hpp>
  6. #include <boost/hana/minus.hpp>
  7. #include <boost/hana/negate.hpp>
  8. #include <boost/hana/tuple.hpp>
  9. #include <laws/group.hpp>
  10. namespace hana = boost::hana;
  11. int main() {
  12. hana::test::TestGroup<int>{hana::make_tuple(0,1,2,3,4,5)};
  13. hana::test::TestGroup<long>{hana::make_tuple(0l,1l,2l,3l,4l,5l)};
  14. // minus
  15. static_assert(hana::minus(6, 4) == 6 - 4, "");
  16. // negate
  17. static_assert(hana::negate(6) == -6, "");
  18. }