diff options
Diffstat (limited to 'libcxx/test/std/utilities/utility')
| -rw-r--r-- | libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp new file mode 100644 index 00000000000..8e994126cc0 --- /dev/null +++ b/libcxx/test/std/utilities/utility/pairs/pair.astuple/tuple_element.fail.cpp @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// 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; + typename std::tuple_element<2, T>::type foo; // expected-error@utility:* {{Index out of bounds in std::tuple_element<std::pair<T1, T2>>}} +} |

