axis_size.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2018 Hans Dembinski
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt
  5. // or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. #include <boost/histogram/axis.hpp>
  7. #include <iostream>
  8. #define SHOW_SIZE(x) std::cout << #x << " " << sizeof(x) << std::endl
  9. int main() {
  10. using namespace boost::histogram;
  11. using regular = axis::regular<>;
  12. using regular_float = axis::regular<float>;
  13. using regular_pow = axis::regular<double, axis::transform::pow>;
  14. using regular_no_metadata = axis::regular<double, axis::transform::id, axis::null_type>;
  15. using circular = axis::circular<>;
  16. using variable = axis::variable<>;
  17. using integer = axis::integer<>;
  18. using category = axis::category<>;
  19. using variant = axis::variant<regular, circular, variable, integer, category>;
  20. SHOW_SIZE(regular);
  21. SHOW_SIZE(regular_float);
  22. SHOW_SIZE(regular_pow);
  23. SHOW_SIZE(regular_no_metadata);
  24. SHOW_SIZE(circular);
  25. SHOW_SIZE(variable);
  26. SHOW_SIZE(integer);
  27. SHOW_SIZE(category);
  28. SHOW_SIZE(variant);
  29. }