mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
buffer.h: avoid using c++14 features
so we dont't need to force librados client to move to C++14 or up. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
f8d47223e2
commit
2b904ae202
@ -189,7 +189,7 @@ namespace buffer CEPH_BUFFER_API {
|
||||
const char *end_ptr; ///< pointer to bp->end_c_str()
|
||||
const bool deep; ///< if true, do not allow shallow ptr copies
|
||||
|
||||
iterator_impl(std::conditional_t<is_const, const ptr*, ptr*> p,
|
||||
iterator_impl(typename std::conditional<is_const, const ptr*, ptr*>::type p,
|
||||
size_t offset, bool d)
|
||||
: bp(p),
|
||||
start(p->c_str() + offset),
|
||||
@ -201,7 +201,7 @@ namespace buffer CEPH_BUFFER_API {
|
||||
friend class ptr;
|
||||
|
||||
public:
|
||||
using pointer = std::conditional_t<is_const, const char*, char *>;
|
||||
using pointer = typename std::conditional<is_const, const char*, char *>::type;
|
||||
pointer get_pos_add(size_t n) {
|
||||
auto r = pos;
|
||||
advance(n);
|
||||
|
Loading…
Reference in New Issue
Block a user