histogram_fail0.cpp 521 B

1234567891011121314151617181920
  1. // Copyright 2019 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/integer.hpp>
  7. #include <boost/histogram/make_histogram.hpp>
  8. int main() {
  9. using namespace boost::histogram;
  10. auto h = make_histogram(axis::integer<>(0, 5));
  11. // invalid sample argument
  12. h(0, sample(1));
  13. auto values = {0, 1};
  14. h.fill(values, sample(values)); // invalid sample argument
  15. }