//===----------------------------------------------------------------------===// // // 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 struct pair // tuple_element >::type #include #include template void test() { { typedef T1 Exp1; typedef T2 Exp2; typedef std::pair P; static_assert((std::is_same::type, Exp1>::value), ""); static_assert((std::is_same::type, Exp2>::value), ""); } { typedef T1 const Exp1; typedef T2 const Exp2; typedef std::pair const P; static_assert((std::is_same::type, Exp1>::value), ""); static_assert((std::is_same::type, Exp2>::value), ""); } { typedef T1 volatile Exp1; typedef T2 volatile Exp2; typedef std::pair volatile P; static_assert((std::is_same::type, Exp1>::value), ""); static_assert((std::is_same::type, Exp2>::value), ""); } { typedef T1 const volatile Exp1; typedef T2 const volatile Exp2; typedef std::pair const volatile P; static_assert((std::is_same::type, Exp1>::value), ""); static_assert((std::is_same::type, Exp2>::value), ""); } } int main(int, char**) { test(); test(); return 0; }