mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #624 Replace typedef with using.
This commit is contained in:
@@ -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()); }
|
||||
|
||||
Reference in New Issue
Block a user