//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template struct pair // tuple_element >::type #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() { test(); test(); }