@@ -172,6 +172,7 @@ using std::vector;
172172using namespace std ::literals;
173173
174174using namespace TOPNSPC ::common;
175+ using namespace std ::literals;
175176
176177namespace bs = boost::system;
177178namespace ca = ceph::async;
@@ -17332,38 +17333,26 @@ void Client::set_cap_epoch_barrier(epoch_t e)
1733217333 cap_epoch_barrier = e;
1733317334}
1733417335
17335- const char ** Client::get_tracked_conf_keys () const
17336- {
17337- # define KEYS \
17338- " client_acl_type" , \
17339- " client_cache_mid" , \
17340- " client_cache_size" , \
17341- " client_caps_release_delay" , \
17342- " client_deleg_break_on_open" , \
17343- " client_deleg_timeout" , \
17344- " client_mount_timeout" , \
17345- " client_oc_max_dirty" , \
17346- " client_oc_max_dirty_age" , \
17347- " client_oc_max_objects" , \
17348- " client_oc_size" , \
17349- " client_oc_target_dirty" , \
17350- " client_permissions" , \
17336+ std::vector<std::string> Client::get_tracked_keys () const noexcept
17337+ {
17338+ static constexpr auto as_sv = std::to_array<std::string_view>({
17339+ " client_acl_type" ,
17340+ " client_cache_mid" ,
17341+ " client_cache_size" ,
17342+ " client_caps_release_delay" ,
17343+ " client_deleg_break_on_open" ,
17344+ " client_deleg_timeout" ,
17345+ " client_mount_timeout" ,
17346+ " client_oc_max_dirty" ,
17347+ " client_oc_max_dirty_age" ,
17348+ " client_oc_max_objects" ,
17349+ " client_oc_size" ,
17350+ " client_oc_target_dirty" ,
17351+ " client_permissions" ,
1735117352 " fuse_default_permissions"
17352-
17353- constexpr bool is_sorted = [] () constexpr {
17354- constexpr auto arr = std::to_array<std::string_view>({KEYS});
17355- for (unsigned long i = 0 ; i < arr.size ()-1 ; ++i) {
17356- if (arr[i] > arr[i+1 ]) {
17357- return false ;
17358- }
17359- }
17360- return true ;
17361- }();
17362- static_assert (is_sorted, " keys are not sorted!" );
17363-
17364- static char const * keys[] = {KEYS, nullptr };
17365-
17366- return keys;
17353+ });
17354+ static_assert (std::is_sorted (begin (as_sv), end (as_sv)));
17355+ return {begin (as_sv), end (as_sv)};
1736717356}
1736817357
1736917358void Client::handle_conf_change (const ConfigProxy& conf,
0 commit comments