]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/histogram/axis/variable.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / histogram / axis / variable.hpp
index ef24ca577cd1a0d359fcbbf011ad9aff892d3422..43772d753c5d2eaddc7f436857d930930e3b9657 100644 (file)
@@ -47,6 +47,7 @@ namespace axis {
 template <class Value, class MetaData, class Options, class Allocator>
 class variable : public iterator_mixin<variable<Value, MetaData, Options, Allocator>>,
                  public metadata_base<MetaData> {
+  // these must be private, so that they are not automatically inherited
   using value_type = Value;
   using metadata_type = typename metadata_base<MetaData>::metadata_type;
   using options_type =
@@ -137,7 +138,7 @@ public:
                                    vec_.begin() - 1);
   }
 
-  auto update(value_type x) noexcept {
+  std::pair<index_type, index_type> update(value_type x) noexcept {
     const auto i = index(x);
     if (std::isfinite(x)) {
       if (0 <= i) {
@@ -146,14 +147,14 @@ public:
         x = std::nextafter(x, (std::numeric_limits<value_type>::max)());
         x = (std::max)(x, vec_.back() + d);
         vec_.push_back(x);
-        return std::make_pair(i, -1);
+        return {i, -1};
       }
       const auto d = value(0.5) - value(0);
       x = (std::min)(x, value(0) - d);
       vec_.insert(vec_.begin(), x);
-      return std::make_pair(0, -i);
+      return {0, -i};
     }
-    return std::make_pair(x < 0 ? -1 : size(), 0);
+    return {x < 0 ? -1 : size(), 0};
   }
 
   /// Return value for fractional index argument.