//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // template class tuple; // template // struct tuple_element > // { // typedef Ti type; // }; // // LWG #2212 says that tuple_size and tuple_element must be // available after including #include #include #include "test_macros.h" template void test() { static_assert((std::is_base_of, std::tuple_size >::value), ""); static_assert((std::is_base_of, std::tuple_size >::value), ""); static_assert((std::is_base_of, std::tuple_size >::value), ""); static_assert((std::is_base_of, std::tuple_size >::value), ""); static_assert((std::is_same::type, U>::value), ""); static_assert((std::is_same::type, const U>::value), ""); static_assert((std::is_same::type, volatile U>::value), ""); static_assert((std::is_same::type, const volatile U>::value), ""); } int main(int, char**) { test, 5, int, 0>(); test, 5, int, 1>(); test, 4, const char *, 3>(); test, 4, volatile int, 3>(); test, 3, char *, 1>(); test, 3, char *, 2>(); return 0; }