refs #624 Replace typedef with using.

This commit is contained in:
Mathew Sutcliffe
2016-03-20 21:52:49 +00:00
parent a8fc899219
commit 6f1cf8e3d7
22 changed files with 47 additions and 47 deletions

View File

@@ -172,7 +172,7 @@ namespace BlackCoreTest
// Helper traits class. Given T is a pointer-to-member-of-U, ClassOf<T>::type is U.
template <class T> struct ClassOf;
template <class U, class R> struct ClassOf<R U::*> { typedef U type; };
template <class U, class R> struct ClassOf<R U::*> { using type = U; };
// Given T is a pointer-to-member-of-U, subject<T>() returns Expect's subject casted to U*.
template <class T> typename ClassOf<T>::type *subject() const { return qobject_cast<typename ClassOf<T>::type *>(m_subject.data()); }