mirror of
https://github.com/ceph/ceph
synced 2025-01-04 10:12:30 +00:00
common: use inline for monostate dencoders
fix a 'multiple definition' error when included by multiple sources: src/common/versioned_variant.h:31: multiple definition of `ceph::encode(std::monostate const&, ceph::buffer::v15_2_0::list&)'; rgw_main.cc.o:src/common/versioned_variant.h:31: first defined here Signed-off-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
parent
f64ad4406c
commit
0179a8ea2f
@ -28,8 +28,8 @@
|
||||
namespace ceph {
|
||||
|
||||
// null encoding for std::monostate
|
||||
void encode(const std::monostate&, bufferlist& bl) {}
|
||||
void decode(std::monostate&, bufferlist::const_iterator& p) {}
|
||||
inline void encode(const std::monostate&, bufferlist& bl) {}
|
||||
inline void decode(std::monostate&, bufferlist::const_iterator& p) {}
|
||||
|
||||
// largest value that can be represented by `__u8 struct_v`
|
||||
inline constexpr size_t max_version = std::numeric_limits<__u8>::max();
|
||||
|
Loading…
Reference in New Issue
Block a user