Fix sample argument bug

fixes: a weight could pass as sample and vice versa
This commit is contained in:
Hans Dembinski
2019-10-31 01:45:02 +01:00
committed by GitHub
parent 3923472642
commit f56337177d
17 changed files with 218 additions and 135 deletions

14
test/profile_fail0.cpp Normal file
View File

@@ -0,0 +1,14 @@
// Copyright 2019 Hans Dembinski
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/histogram/axis/integer.hpp>
#include <boost/histogram/make_profile.hpp>
int main() {
using namespace boost::histogram;
auto h = make_profile(axis::integer<>(0, 5));
h(0, weight(1)); // profile requires a sample
}