mirror of
https://github.com/boostorg/histogram.git
synced 2026-02-19 14:32:12 +00:00
Fix sample argument bug
fixes: a weight could pass as sample and vice versa
This commit is contained in:
14
test/profile_fail3.cpp
Normal file
14
test/profile_fail3.cpp
Normal 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, sample(1, 2)); // weighted profile requires one sample
|
||||
}
|
||||
Reference in New Issue
Block a user