]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
buffer.h: avoid using c++14 features 22103/head
authorKefu Chai <kchai@redhat.com>
Sun, 20 May 2018 11:54:00 +0000 (19:54 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 21 May 2018 05:28:23 +0000 (13:28 +0800)
so we dont't need to force librados client to move to C++14 or up.

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

index 606025005b0d47720ec197c69b487bdb7ed18bee..f5b9094928b4010f38636328e3f6d7da350628bb 100644 (file)
@@ -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);