mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
bug fix of indexed for array storage
This commit is contained in:
parent
1ff14e723c
commit
3923472642
@ -14,6 +14,7 @@
|
||||
#include <boost/histogram/detail/iterator_adaptor.hpp>
|
||||
#include <boost/histogram/detail/operators.hpp>
|
||||
#include <boost/histogram/fwd.hpp>
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
@ -43,9 +44,11 @@ private:
|
||||
detail::buffer_size<typename std::remove_const_t<histogram_type>::axes_type>::value;
|
||||
|
||||
public:
|
||||
using value_iterator = decltype(std::declval<histogram_type>().begin());
|
||||
using value_reference = typename value_iterator::reference;
|
||||
using value_type = typename value_iterator::value_type;
|
||||
using value_iterator = std::conditional_t<std::is_const<histogram_type>::value,
|
||||
typename histogram_type::const_iterator,
|
||||
typename histogram_type::iterator>;
|
||||
using value_reference = typename std::iterator_traits<value_iterator>::reference;
|
||||
using value_type = typename std::iterator_traits<value_iterator>::value_type;
|
||||
|
||||
class iterator;
|
||||
using range_iterator = iterator; ///< deprecated
|
||||
|
@ -124,7 +124,7 @@ template <class IsDynamic, class Coverage>
|
||||
void run_stdlib_tests(mp_list<IsDynamic, Coverage>) {
|
||||
auto ax = axis::regular<>(3, 0, 1);
|
||||
auto ay = axis::integer<>(0, 2);
|
||||
auto h = make_s(IsDynamic(), std::vector<int>(), ax, ay);
|
||||
auto h = make_s(IsDynamic(), std::array<int, 20>(), ax, ay);
|
||||
|
||||
struct generator {
|
||||
int i = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user