From: Kefu Chai Date: Fri, 7 May 2021 05:14:33 +0000 (+0800) Subject: crimson/common/config_proxy: add a helper for get_val<>() X-Git-Tag: v17.1.0~2045^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41214%2Fhead;p=ceph.git crimson/common/config_proxy: add a helper for get_val<>() otherwise we have to put something like local_conf().template get_val(name) which is not quite convenient or readable. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/config_proxy.h b/src/crimson/common/config_proxy.h index f50a63431882..f7611a6b4fc5 100644 --- a/src/crimson/common/config_proxy.h +++ b/src/crimson/common/config_proxy.h @@ -197,4 +197,9 @@ inline ConfigProxy::ShardedConfig& sharded_conf() { return ConfigProxy::sharded_conf; } +template +const T get_conf(const std::string& key) { + return local_conf().template get_val(key); +} + }