]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/common: add type_helpers with a single Ref definition
authorSamuel Just <sjust@redhat.com>
Tue, 11 Jun 2019 00:22:26 +0000 (17:22 -0700)
committerSamuel Just <sjust@redhat.com>
Tue, 11 Jun 2019 00:37:28 +0000 (17:37 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/common/type_helpers.h [new file with mode: 0644]
src/crimson/osd/osd.h
src/crimson/osd/pg.h

diff --git a/src/crimson/common/type_helpers.h b/src/crimson/common/type_helpers.h
new file mode 100644 (file)
index 0000000..4c60658
--- /dev/null
@@ -0,0 +1,8 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
+
+#include "boost/intrusive_ptr.hpp"
+
+template<typename T> using Ref = boost::intrusive_ptr<T>;
index f8582f791813bcf113781f0ba36e3af19cb82b7c..d4e3bd854a025922db3231c675a36053ab0315b4 100644 (file)
@@ -13,6 +13,7 @@
 #include <seastar/core/shared_future.hh>
 #include <seastar/core/timer.hh>
 
+#include "crimson/common/type_helpers.h"
 #include "crimson/common/auth_handler.h"
 #include "crimson/common/simple_lru.h"
 #include "crimson/common/shared_lru.h"
@@ -49,7 +50,6 @@ namespace ceph::os {
   class Transaction;
 }
 
-template<typename T> using Ref = boost::intrusive_ptr<T>;
 
 class OSD : public ceph::net::Dispatcher,
            private OSDMapService,
index a0098e3b3f9f1493479c70eec72c088fb758cf03..71a297a9582a89f167b5e83aca94a3440388c875 100644 (file)
@@ -19,7 +19,7 @@
 #include "osd/osd_internal_types.h"
 #include "osd/PeeringState.h"
 
-template<typename T> using Ref = boost::intrusive_ptr<T>;
+#include "crimson/common/type_helpers.h"
 class OSDMap;
 class MQuery;
 class PGBackend;