mirror of https://github.com/ceph/ceph
common: a simple API to extract md_config_cacher_t cached value
Using a type-deduced operator() (i.e. my_opt() ), instead of the existing ValueT() operator (which requires a type-matching cast). Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
This commit is contained in:
parent
29546089ee
commit
a99fa1c51e
|
@ -53,6 +53,10 @@ public:
|
|||
operator ValueT() const {
|
||||
return value_cache.load();
|
||||
}
|
||||
|
||||
ValueT operator*() const {
|
||||
return value_cache.load();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEPH_CONFIG_CACHER_H
|
||||
|
|
Loading…
Reference in New Issue