Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: userver/core/src/utils/statistics/impl/histogram_view_utils.hpp
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp b/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp
- --- a/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp (revision 89714b963aff7186947917a56b145888d17563a9)
- +++ b/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp (date 1706080231393)
- @@ -32,10 +32,13 @@
- template <typename AnyHistogramView>
- static auto Bounds(AnyHistogramView view) noexcept {
- - const auto bound_ref_getter = [](auto&& bucket) -> auto& {
- - return bucket.upper_bound.bound;
- + // GCC 8.3 ICEs on a lambda passed to transform.
- + struct BoundGetter final {
- + double operator()(const Bucket& bucket) const {
- + return bucket.upper_bound.bound;
- + }
- };
- - return Buckets(view) | boost::adaptors::transformed(bound_ref_getter);
- + return Buckets(view) | boost::adaptors::transformed(BoundGetter{});
- }
- template <typename AnyHistogramView>
- @@ -97,7 +100,10 @@
- UINVARIANT(*upper_bounds.begin(), "Histogram bounds must be positive");
- }
- buckets_[0].upper_bound.size = std::size(upper_bounds);
- - boost::copy(upper_bounds, Access::Bounds(*this).begin());
- + for (auto [bucket, bound] :
- + boost::combine(Access::Buckets(*this), upper_bounds)) {
- + bucket.upper_bound.bound = bound;
- + }
- }
- // Atomic for 'other', non-atomic for 'this'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement