Files
libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp
Roger Ferrer Ibanez 2f494f7331 Remove unneeded typename from test
Differential Revision: https://reviews.llvm.org/D38628



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@315278 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-10 07:42:19 +00:00

23 lines
664 B
C++

//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <utility>
// template <class T1, class T2> struct pair
// tuple_element<I, pair<T1, T2> >::type
#include <utility>
int main()
{
typedef std::pair<int, short> T;
std::tuple_element<2, T>::type foo; // expected-error@utility:* {{Index out of bounds in std::tuple_element<std::pair<T1, T2>>}}
}