Bug 1243876 - fix ConvertibleTester to not cause incomplete type errors with UniquePtr and Skia. r=nfroyd

This commit is contained in:
Lee Salzman 2016-01-28 16:08:27 -05:00
Родитель 6c7038cfd7
Коммит 71421aec25
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -679,18 +679,15 @@ struct IsBaseOf
namespace detail { namespace detail {
// This belongs inside ConvertibleTester, but it's pulled out to
// work around a bug in the compiler used for hazard builds.
template <typename To>
static void ConvertibleTestHelper(To);
template<typename From, typename To> template<typename From, typename To>
struct ConvertibleTester struct ConvertibleTester
{ {
private: private:
template<typename From1, typename To1, template<typename To1>
typename = decltype(ConvertibleTestHelper<To1>(DeclVal<From>()))> static char test_helper(To1);
static char test(int);
template<typename From1, typename To1>
static decltype(test_helper<To1>(DeclVal<From1>())) test(int);
template<typename From1, typename To1> template<typename From1, typename To1>
static int test(...); static int test(...);