Skip to content

Commit

Permalink
Merge pull request #19986 from tchaikov/wip-denc-size-t-featured
Browse files Browse the repository at this point in the history
denc: should check element's type not 'size_t'

Reviewed-by: Adam Emerson <aemerson@redhat.com>
  • Loading branch information
liewegas committed Jan 22, 2018
2 parents 6f7e54d + fdc1a39 commit f9e02d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/denc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ struct denc_traits<
static std::enable_if_t<denc_traits<U>::featured>
bound_encode(const container& s, size_t& p, uint64_t f) {
ceph::for_each(s, [&p, f] (const auto& e) {
if constexpr (denc_traits<std::decay_t<decltype(p)>>::featured) {
if constexpr (denc_traits<std::decay_t<decltype(e)>>::featured) {
denc(e, p, f);
} else {
denc(e, p);
Expand All @@ -1153,7 +1153,7 @@ struct denc_traits<
static std::enable_if_t<denc_traits<U>::featured>
encode(const container& s, buffer::list::contiguous_appender& p, uint64_t f) {
ceph::for_each(s, [&p, f] (const auto& e) {
if constexpr (denc_traits<std::decay_t<decltype(p)>>::featured) {
if constexpr (denc_traits<std::decay_t<decltype(e)>>::featured) {
denc(e, p, f);
} else {
denc(e, p);
Expand Down

0 comments on commit f9e02d5

Please sign in to comment.