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

@@ -54,7 +54,7 @@ namespace BlackMisc
// http://en.wikibooks.org/wiki/More_C++_Idioms/Member_Detector
struct Empty {};
struct Fallback { int propertyByIndex; };
template <int Fallback:: *> struct int_t { typedef int type; };
template <int Fallback:: *> struct int_t { using type = int; };
template <typename U> struct Derived : public Fallback, public std::conditional_t<std::is_void<U>::value, Empty, U> {};
template <typename U> static void test(typename int_t<&Derived<U>::propertyByIndex>::type);
@@ -62,7 +62,7 @@ namespace BlackMisc
public:
//! Type of T::base_type, or void if not declared.
typedef decltype(test<typename BaseOf<T>::type>(0)) type;
using type = decltype(test<typename BaseOf<T>::type>(0));
};
/*!