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
parent 879feeb230
commit 41c61715b2

View File

@ -679,18 +679,15 @@ struct IsBaseOf
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>
struct ConvertibleTester
{
private:
template<typename From1, typename To1,
typename = decltype(ConvertibleTestHelper<To1>(DeclVal<From>()))>
static char test(int);
template<typename To1>
static char test_helper(To1);
template<typename From1, typename To1>
static decltype(test_helper<To1>(DeclVal<From1>())) test(int);
template<typename From1, typename To1>
static int test(...);