]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/config.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / common / config.h
index 989f5029e1270493ddf680d372d35219cac53185..bafac663127370237224176a15fd9e9bfdab75cc 100644 (file)
@@ -16,6 +16,7 @@
 #define CEPH_CONFIG_H
 
 #include <map>
+#include <variant>
 #include <boost/container/small_vector.hpp>
 #include "common/ConfUtils.h"
 #include "common/code_environment.h"
@@ -69,14 +70,14 @@ extern const char *ceph_conf_level_name(int level);
  */
 struct md_config_t {
 public:
-  typedef boost::variant<int64_t ConfigValues::*,
-                         uint64_t ConfigValues::*,
-                         std::string ConfigValues::*,
-                         double ConfigValues::*,
-                         bool ConfigValues::*,
-                         entity_addr_t ConfigValues::*,
-                        entity_addrvec_t ConfigValues::*,
-                         uuid_d ConfigValues::*> member_ptr_t;
+  typedef std::variant<int64_t ConfigValues::*,
+                       uint64_t ConfigValues::*,
+                       std::string ConfigValues::*,
+                       double ConfigValues::*,
+                       bool ConfigValues::*,
+                       entity_addr_t ConfigValues::*,
+                       entity_addrvec_t ConfigValues::*,
+                       uuid_d ConfigValues::*> member_ptr_t;
 
   // For use when intercepting configuration updates
   typedef std::function<bool(
@@ -204,7 +205,7 @@ public:
                Callback&& cb, Args&&... args) const ->
     std::result_of_t<Callback(const T&, Args...)> {
     return std::forward<Callback>(cb)(
-      boost::get<T>(this->get_val_generic(values, key)),
+      std::get<T>(this->get_val_generic(values, key)),
       std::forward<Args>(args)...);
   }
 
@@ -360,10 +361,10 @@ public:
 template<typename T>
 const T md_config_t::get_val(const ConfigValues& values,
                             const std::string_view key) const {
-  return boost::get<T>(this->get_val_generic(values, key));
+  return std::get<T>(this->get_val_generic(values, key));
 }
 
-inline std::ostream& operator<<(std::ostream& o, const boost::blank& ) {
+inline std::ostream& operator<<(std::ostream& o, const std::monostate&) {
       return o << "INVALID_CONFIG_VALUE";
 }