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 <aemerson@redhat.com>
template <typename I>
void BootstrapRequest<I>::handle_open_remote_image(int r) {
// deduce the class type for the journal to support unit tests
- typedef typename std::decay<decltype(*I::journal)>::type Journal;
+ using Journal = typename std::decay<
+ typename std::remove_pointer<decltype(std::declval<I>().journal)>
+ ::type>::type;
dout(20) << ": r=" << r << dendl;
template <typename I>
void OpenLocalImageRequest<I>::send_lock_image() {
// deduce the class type for the journal to support unit tests
- typedef typename std::decay<decltype(*I::journal)>::type Journal;
+ using Journal = typename std::decay<
+ typename std::remove_pointer<decltype(std::declval<I>().journal)>
+ ::type>::type;
dout(20) << dendl;