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 8e60cf86eddfa8956ed010dc991deeba7ba0112e)
- +++ b/userver/core/src/utils/statistics/impl/histogram_view_utils.hpp (date 1705940614599)
- @@ -19,6 +19,14 @@
- namespace utils::statistics::impl::histogram {
- +// Generic lambda crashes on GCC 8.3.0
- +struct BoundRefGetter {
- + template <typename Bucket>
- + auto& operator()(Bucket&& bucket) {
- + return bucket.upper_bound.bound;
- + }
- +};
- +
- struct Access final {
- static HistogramView MakeView(const Bucket* buckets) noexcept {
- return HistogramView{buckets};
- @@ -32,10 +40,7 @@
- template <typename AnyHistogramView>
- static auto Bounds(AnyHistogramView view) noexcept {
- - const auto bound_ref_getter = [](auto&& bucket) -> auto& {
- - return bucket.upper_bound.bound;
- - };
- - return Buckets(view) | boost::adaptors::transformed(bound_ref_getter);
- + return Buckets(view) | boost::adaptors::transformed(BoundRefGetter{});
- }
- template <typename AnyHistogramView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement