From ae64e44fcf6fb4c5f29a56acce1e70b552a32427 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 10 Jun 2019 17:22:26 -0700 Subject: [PATCH] crimson/common: add type_helpers with a single Ref definition Signed-off-by: Samuel Just --- src/crimson/common/type_helpers.h | 8 ++++++++ src/crimson/osd/osd.h | 2 +- src/crimson/osd/pg.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/crimson/common/type_helpers.h diff --git a/src/crimson/common/type_helpers.h b/src/crimson/common/type_helpers.h new file mode 100644 index 00000000000..4c606581fb5 --- /dev/null +++ b/src/crimson/common/type_helpers.h @@ -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 using Ref = boost::intrusive_ptr; diff --git a/src/crimson/osd/osd.h b/src/crimson/osd/osd.h index f8582f79181..d4e3bd854a0 100644 --- a/src/crimson/osd/osd.h +++ b/src/crimson/osd/osd.h @@ -13,6 +13,7 @@ #include #include +#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 using Ref = boost::intrusive_ptr; class OSD : public ceph::net::Dispatcher, private OSDMapService, diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index a0098e3b3f9..71a297a9582 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -19,7 +19,7 @@ #include "osd/osd_internal_types.h" #include "osd/PeeringState.h" -template using Ref = boost::intrusive_ptr; +#include "crimson/common/type_helpers.h" class OSDMap; class MQuery; class PGBackend; -- 2.39.5