]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
include/denc: add missing {encode,decode}_nohead for denc_traits 14099/head
authorKefu Chai <kchai@redhat.com>
Fri, 24 Mar 2017 05:38:04 +0000 (13:38 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 25 Mar 2017 04:06:04 +0000 (12:06 +0800)
commit65fb399ebb166e90a0fafd93aee0536030ded90b
tree7a03ad09dfd128f5a5ffc6cce3372c8690aacb78
parentaa597ae00f88d3fd78851f397d6577ebf8425751
include/denc: add missing {encode,decode}_nohead for denc_traits

implement {encode,decode}_nohead() for dec_traits<basic_string> and
bufferlist.

so compiler can find an appropriate version of decode_nohead() when
performing overload resolution. in some architectures, compiler resolves
the __u32 to size_t, which leads to a compilation failure, because the
compiler fails to instantiate the ::decode_nohead() template exposing
traits::decode_nohead().

Fixes: http://tracker.ceph.com/issues/18938
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/denc.h
src/test/encoding.cc