From: Adam C. Emerson Date: Thu, 10 Nov 2016 19:25:18 +0000 (-0500) Subject: rbd: Fix invalid type inferences X-Git-Tag: v11.1.0~241^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=146e7ab9b63ad81e1fab736ebd13e16e68b47ad6;p=ceph.git 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 --- diff --git a/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc b/src/tools/rbd_mirror/image_replayer/BootstrapRequest.cc index 15e76091a77d..b7ead13b04bb 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 24b98e5ddb50..588e64ec35a6 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;