Index: test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp =================================================================== --- test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp +++ test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp @@ -64,18 +64,22 @@ void test_decomp_pair() { typedef std::pair T; { - T s{99, 42.1}; + T s{99, 42.5}; auto [m1, m2] = s; auto& [r1, r2] = s; assert(m1 == 99); + assert(m2 == 42.5); assert(&r1 == &std::get<0>(s)); + assert(&r2 == &std::get<1>(s)); } { - T const s{99, 42.1}; + T const s{99, 42.5}; auto [m1, m2] = s; auto& [r1, r2] = s; assert(m1 == 99); + assert(m2 == 42.5); assert(&r1 == &std::get<0>(s)); + assert(&r2 == &std::get<1>(s)); } } @@ -86,14 +90,22 @@ auto [m1, m2, m3] = s; auto& [r1, r2, r3] = s; assert(m1 == 99); + assert(m2 == 42); + assert(m3 == -1); assert(&r1 == &std::get<0>(s)); + assert(&r2 == &std::get<1>(s)); + assert(&r3 == &std::get<2>(s)); } { T const s{{99, 42, -1}}; auto [m1, m2, m3] = s; auto& [r1, r2, r3] = s; assert(m1 == 99); + assert(m2 == 42); + assert(m3 == -1); assert(&r1 == &std::get<0>(s)); + assert(&r2 == &std::get<1>(s)); + assert(&r3 == &std::get<2>(s)); } } @@ -105,8 +117,7 @@ int get(Test const&) { static_assert(N == 0, ""); return -1; } template <> -class std::tuple_element<0, Test> { -public: +struct std::tuple_element<0, Test> { typedef int type; }; @@ -117,8 +128,7 @@ } template <> -class std::tuple_size { -public: +struct std::tuple_size { static const size_t value = 1; };