31
31
#include < seastar/net/api.hh>
32
32
#include < stdexcept>
33
33
#include < string>
34
- #include < boost/ any.hpp >
34
+ #include < any>
35
35
#include < boost/type.hpp>
36
36
#include < seastar/util/std-compat.hh>
37
37
#include < seastar/util/variant_utils.hh>
@@ -99,16 +99,16 @@ struct client_info {
99
99
socket_address addr;
100
100
rpc::server& server;
101
101
connection_id conn_id;
102
- std::unordered_map<sstring, boost ::any> user_data;
102
+ std::unordered_map<sstring, std ::any> user_data;
103
103
template <typename T>
104
104
void attach_auxiliary (const sstring& key, T&& object) {
105
- user_data.emplace (key, boost ::any (std::forward<T>(object)));
105
+ user_data.emplace (key, std ::any (std::forward<T>(object)));
106
106
}
107
107
template <typename T>
108
108
T& retrieve_auxiliary (const sstring& key) {
109
109
auto it = user_data.find (key);
110
110
assert (it != user_data.end ());
111
- return boost ::any_cast<T&>(it->second );
111
+ return std ::any_cast<T&>(it->second );
112
112
}
113
113
template <typename T>
114
114
std::add_const_t <T>& retrieve_auxiliary (const sstring& key) const {
@@ -120,15 +120,15 @@ struct client_info {
120
120
if (it == user_data.end ()) {
121
121
return nullptr ;
122
122
}
123
- return &boost ::any_cast<T&>(it->second );
123
+ return &std ::any_cast<T&>(it->second );
124
124
}
125
125
template <typename T>
126
126
const T* retrieve_auxiliary_opt (const sstring& key) const noexcept {
127
127
auto it = user_data.find (key);
128
128
if (it == user_data.end ()) {
129
129
return nullptr ;
130
130
}
131
- return &boost ::any_cast<const T&>(it->second );
131
+ return &std ::any_cast<const T&>(it->second );
132
132
}
133
133
};
134
134
0 commit comments