diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-04-10 23:47:47 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-04-10 23:47:47 +0000 |
commit | c2be5ab5810ba5e7951d0bf7c1f84922356daf2c (patch) | |
tree | 02fcfba6a6dda2ae41851cd7207a6e63b8383030 /libcxx/test/std/utilities | |
parent | 8ff7785ee19a86289804de9fc1727f799f784f16 (diff) | |
download | bcm5719-llvm-c2be5ab5810ba5e7951d0bf7c1f84922356daf2c.tar.gz bcm5719-llvm-c2be5ab5810ba5e7951d0bf7c1f84922356daf2c.zip |
Fix PR#32605: common_type<T> is not SFINAE-friendly
llvm-svn: 299901
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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>, long> {}; template <> struct common_type<long, ::S<long> > {}; + template <> struct common_type<::X<float> > {}; + template <> struct common_type<::X<double>, ::X<double> > {}; } #if TEST_STD_VER >= 11 @@ -304,5 +306,7 @@ int main() static_assert((std::is_same<std::common_type<const int, int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<int, const int>::type, int>::value), ""); static_assert((std::is_same<std::common_type<const int, const int>::type, int>::value), ""); - + + static_assert(no_common_type<X<float> >::value, ""); + static_assert(no_common_type<X<double> >::value, ""); } |