empty_member.cpp 818 B

123456789101112131415161718192021222324252627282930313233
  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/tuple.hpp>
  5. namespace hana = boost::hana;
  6. struct A { };
  7. struct B { };
  8. int main() {
  9. {
  10. using T = hana::tuple<int, A>;
  11. static_assert(sizeof(T) == sizeof(int), "");
  12. }
  13. {
  14. using T = hana::tuple<A, int>;
  15. static_assert(sizeof(T) == sizeof(int), "");
  16. }
  17. {
  18. using T = hana::tuple<A, int, B>;
  19. static_assert(sizeof(T) == sizeof(int), "");
  20. }
  21. {
  22. using T = hana::tuple<A, B, int>;
  23. static_assert(sizeof(T) == sizeof(int), "");
  24. }
  25. {
  26. using T = hana::tuple<int, A, B>;
  27. static_assert(sizeof(T) == sizeof(int), "");
  28. }
  29. }