From 3245e1f34b67d24bfd71fb7d2f100be1046a1b5f Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 14 Jun 2016 03:21:49 +0000 Subject: Fix warnings in tests. llvm-svn: 272629 --- .../tuple/tuple.apply/return_type.pass.cpp | 56 ++++++++++------------ 1 file changed, 25 insertions(+), 31 deletions(-) (limited to 'libcxx/test/std/experimental/utilities/tuple/tuple.apply') diff --git a/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp b/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp index 1ec38da5c04..314d2783f7e 100644 --- a/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp +++ b/libcxx/test/std/experimental/utilities/tuple/tuple.apply/return_type.pass.cpp @@ -25,30 +25,27 @@ template struct index {}; void f(index<0>) {} int f(index<1>) { return 0; } -int const f(index<2>) { return 0; } -int volatile f(index<3>) { return 0; } -int const volatile f(index<4>) { return 0; } -int & f(index<5>) { return static_cast(my_int); } -int const & f(index<6>) { return static_cast(my_int); } -int volatile & f(index<7>) { return static_cast(my_int); } -int const volatile & f(index<8>) { return static_cast(my_int); } +int & f(index<2>) { return static_cast(my_int); } +int const & f(index<3>) { return static_cast(my_int); } +int volatile & f(index<4>) { return static_cast(my_int); } +int const volatile & f(index<5>) { return static_cast(my_int); } -int && f(index<9>) { return static_cast(my_int); } -int const && f(index<10>) { return static_cast(my_int); } -int volatile && f(index<11>) { return static_cast(my_int); } -int const volatile && f(index<12>) { return static_cast(my_int); } +int && f(index<6>) { return static_cast(my_int); } +int const && f(index<7>) { return static_cast(my_int); } +int volatile && f(index<8>) { return static_cast(my_int); } +int const volatile && f(index<9>) { return static_cast(my_int); } -int * f(index<13>) { return static_cast(&my_int); } -int const * f(index<14>) { return static_cast(&my_int); } -int volatile * f(index<15>) { return static_cast(&my_int); } -int const volatile * f(index<16>) { return static_cast(&my_int); } +int * f(index<10>) { return static_cast(&my_int); } +int const * f(index<11>) { return static_cast(&my_int); } +int volatile * f(index<12>) { return static_cast(&my_int); } +int const volatile * f(index<13>) { return static_cast(&my_int); } template void test() { - using F = decltype((f(index{}))); + using F = decltype(f(index{})); static_assert(std::is_same::value, ""); } @@ -58,19 +55,16 @@ int main() { test<0, void>(); test<1, int>(); - //test<2, int const>(); - //test<3, int volatile>(); - //test<4, int const volatile>(); - test<5, int &>(); - test<6, int const &>(); - test<7, int volatile &>(); - test<8, int const volatile &>(); - test<9, int &&>(); - test<10, int const &&>(); - test<11, int volatile &&>(); - test<12, int const volatile &&>(); - test<13, int *>(); - test<14, int const *>(); - test<15, int volatile *>(); - test<16, int const volatile *>(); + test<2, int &>(); + test<3, int const &>(); + test<4, int volatile &>(); + test<5, int const volatile &>(); + test<6, int &&>(); + test<7, int const &&>(); + test<8, int volatile &&>(); + test<9, int const volatile &&>(); + test<10, int *>(); + test<11, int const *>(); + test<12, int volatile *>(); + test<13, int const volatile *>(); } -- cgit v1.2.3