Boost logo

Boost Users :

Subject: [Boost-users] [heap] Mix use of size_t and size_type
From: Matthias Meulien (orontee_at_[hidden])
Date: 2015-03-09 17:54:07


While reading d_ary_heap.hpp from the heap library I was surprised to
see a mix of size_t and size_type variables in an index computation

    size_type last_child_index(size_type index) const
        const size_t first_index = first_child_index(index);
        const size_type last_index = (std::min)(first_index + D - 1,
size() - 1);

        return last_index;

Isn't this a typo?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at