]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
denc: enable decode basic_string<>
authorKefu Chai <kchai@redhat.com>
Mon, 26 Nov 2018 15:52:39 +0000 (23:52 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 27 Nov 2018 16:26:00 +0000 (00:26 +0800)
commitc4544d1514b49b7b434d79e7490af8564fb1b1ea
tree69ae8c61d5bbd7efebcb02f634814e8d5975fa66
parent825930b79b025afd3113b2aebcf4f4429d898d9b
denc: enable decode basic_string<>

we have

buffer::list::iterator_impl<is_const>::copy(unsigned len,
std::string &dest)

but we don't have the templatized version of it. so, if we
plugin a different allocator to basic_string<>, the new string won't
decode with buffer::list::const_iterator. this decode variant is used if
the caller only has a (probably non-contiguous) buffer::list in hand.

in this change, copy(unsigned, char*) is used as an alternative.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/denc.h