Skip to content

Commit ffe8916

Browse files
committed
Fix various test failures with GCC
llvm-svn: 371880
1 parent 4ba6717 commit ffe8916

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

libcxx/include/type_traits

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ struct _Lazy : _Func<_Args...> {};
509509

510510
// Member detector base
511511

512-
template <template <class...> class _Templ, class ..._Args>
513-
true_type __sfinae_test_impl(_FirstType<int, _Templ<_Args...> >);
512+
template <template <class...> class _Templ, class ..._Args, class = _Templ<_Args...>>
513+
true_type __sfinae_test_impl(int);
514514
template <template <class...> class, class ...>
515515
false_type __sfinae_test_impl(...);
516516

libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,17 @@ int main(int, char**)
244244

245245
test_is_constructible<const int&, ExplicitTo<int&>&>();
246246
test_is_constructible<const int&, ExplicitTo<int&>>();
247-
test_is_constructible<int&, ExplicitTo<int&>>();
248-
test_is_constructible<const int&, ExplicitTo<int&&>>();
247+
249248

250249
// Binding through reference-compatible type is required to perform
251250
// direct-initialization as described in [over.match.ref] p. 1 b. 1:
251+
//
252+
// But the rvalue to lvalue reference binding isn't allowed according to
253+
// [over.match.ref] despite Clang accepting it.
252254
test_is_constructible<int&, ExplicitTo<int&>>();
255+
#ifndef TEST_COMPILER_GCC
253256
test_is_constructible<const int&, ExplicitTo<int&&>>();
257+
#endif
254258

255259
static_assert(std::is_constructible<int&&, ExplicitTo<int&&>>::value, "");
256260
#ifdef __clang__

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/deduct.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// GCC's implementation of class template deduction is still immature and runs
1414
// into issues with libc++. However GCC accepts this code when compiling
1515
// against libstdc++.
16-
// XFAIL: gcc
16+
// XFAIL: gcc-5, gcc-6, gcc-7
1717

1818
// <tuple>
1919

0 commit comments

Comments
 (0)