From c2be5ab5810ba5e7951d0bf7c1f84922356daf2c Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Mon, 10 Apr 2017 23:47:47 +0000 Subject: Fix PR#32605: common_type is not SFINAE-friendly llvm-svn: 299901 --- .../utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libcxx/test/std/utilities') diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp index 736f74b4c27..db7b4c2f412 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp @@ -45,6 +45,8 @@ namespace std template <> struct common_type< ::S, long> {}; template <> struct common_type > {}; + template <> struct common_type<::X > {}; + template <> struct common_type<::X, ::X > {}; } #if TEST_STD_VER >= 11 @@ -304,5 +306,7 @@ int main() static_assert((std::is_same::type, int>::value), ""); static_assert((std::is_same::type, int>::value), ""); static_assert((std::is_same::type, int>::value), ""); - + + static_assert(no_common_type >::value, ""); + static_assert(no_common_type >::value, ""); } -- cgit v1.2.3