forked from OSchip/llvm-project
parent
4ba6717c7e
commit
ffe8916cf2
|
@ -509,8 +509,8 @@ struct _Lazy : _Func<_Args...> {};
|
|||
|
||||
// Member detector base
|
||||
|
||||
template <template <class...> class _Templ, class ..._Args>
|
||||
true_type __sfinae_test_impl(_FirstType<int, _Templ<_Args...> >);
|
||||
template <template <class...> class _Templ, class ..._Args, class = _Templ<_Args...>>
|
||||
true_type __sfinae_test_impl(int);
|
||||
template <template <class...> class, class ...>
|
||||
false_type __sfinae_test_impl(...);
|
||||
|
||||
|
|
|
@ -244,13 +244,17 @@ int main(int, char**)
|
|||
|
||||
test_is_constructible<const int&, ExplicitTo<int&>&>();
|
||||
test_is_constructible<const int&, ExplicitTo<int&>>();
|
||||
test_is_constructible<int&, ExplicitTo<int&>>();
|
||||
test_is_constructible<const int&, ExplicitTo<int&&>>();
|
||||
|
||||
|
||||
// Binding through reference-compatible type is required to perform
|
||||
// direct-initialization as described in [over.match.ref] p. 1 b. 1:
|
||||
//
|
||||
// But the rvalue to lvalue reference binding isn't allowed according to
|
||||
// [over.match.ref] despite Clang accepting it.
|
||||
test_is_constructible<int&, ExplicitTo<int&>>();
|
||||
#ifndef TEST_COMPILER_GCC
|
||||
test_is_constructible<const int&, ExplicitTo<int&&>>();
|
||||
#endif
|
||||
|
||||
static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "");
|
||||
#ifdef __clang__
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// GCC's implementation of class template deduction is still immature and runs
|
||||
// into issues with libc++. However GCC accepts this code when compiling
|
||||
// against libstdc++.
|
||||
// XFAIL: gcc
|
||||
// XFAIL: gcc-5, gcc-6, gcc-7
|
||||
|
||||
// <tuple>
|
||||
|
||||
|
|
Loading…
Reference in New Issue