Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / histogram / test / histogram_fail3.cpp
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
7 #include <boost/histogram/axis/integer.hpp>
8 #include <boost/histogram/make_histogram.hpp>
9
10 int main() {
11   struct accumulator {
12     void operator()(double) {}
13   };
14
15   using namespace boost::histogram;
16   auto h = make_histogram_with(dense_storage<accumulator>(), axis::integer<>(0, 5));
17
18   // wrong number of sample arguments
19   h(0, sample(1, 2));
20
21   auto values = {0, 1};
22   h.fill(values, sample(values, values));
23 }