mirror of
https://github.com/ceph/ceph
synced 2025-02-25 03:52:04 +00:00
json: encoding for flat_set accepts all template params
Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
b44b71ab08
commit
b2c6a30c21
@ -220,8 +220,8 @@ void decode_json_obj(std::set<T>& l, JSONObj *obj)
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void decode_json_obj(boost::container::flat_set<T>& l, JSONObj *obj)
|
||||
template<class T, class Compare, class Alloc>
|
||||
void decode_json_obj(boost::container::flat_set<T, Compare, Alloc>& l, JSONObj *obj)
|
||||
{
|
||||
l.clear();
|
||||
|
||||
@ -560,9 +560,9 @@ static void encode_json(const char *name, const std::set<T, Compare>& l, ceph::F
|
||||
f->close_section();
|
||||
}
|
||||
|
||||
template<class T, class Compare = std::less<T> >
|
||||
template<class T, class Compare, class Alloc>
|
||||
static void encode_json(const char *name,
|
||||
const boost::container::flat_set<T, Compare>& l,
|
||||
const boost::container::flat_set<T, Compare, Alloc>& l,
|
||||
ceph::Formatter *f)
|
||||
{
|
||||
f->open_array_section(name);
|
||||
|
Loading…
Reference in New Issue
Block a user