From 146e7ab9b63ad81e1fab736ebd13e16e68b47ad6 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Thu, 10 Nov 2016 14:25:18 -0500 Subject: [PATCH] rbd: Fix invalid type inferences These are big and ugly and could be made ever so much nicer with a C++14 compatibility header providing the *_t variation of the type traits templates. Signed-off-by: Adam C. Emerson --- src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc | 4 +++- src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc index 15e76091a77d2..b7ead13b04bb7 100644 --- a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc @@ -254,7 +254,9 @@ void BootstrapRequest::open_remote_image() { template void BootstrapRequest::handle_open_remote_image(int r) { // deduce the class type for the journal to support unit tests - typedef typename std::decay::type Journal; + using Journal = typename std::decay< + typename std::remove_pointer().journal)> + ::type>::type; dout(20) << ": r=" << r << dendl; diff --git a/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc b/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc index 24b98e5ddb509..588e64ec35a65 100644 --- a/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/OpenLocalImageRequest.cc @@ -120,7 +120,9 @@ void OpenLocalImageRequest::handle_open_image(int r) { template void OpenLocalImageRequest::send_lock_image() { // deduce the class type for the journal to support unit tests - typedef typename std::decay::type Journal; + using Journal = typename std::decay< + typename std::remove_pointer().journal)> + ::type>::type; dout(20) << dendl; -- 2.39.5