//===----------------------------------------------------------------------===// // // 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 // template // const typename tuple_element >::type& // get(const pair&); #include #include int main() { { typedef std::pair P; const P p(3, 4); assert(std::get<0>(p) == 3); assert(std::get<1>(p) == 4); } #if __cplusplus > 201103L { typedef std::pair P; constexpr P p1(3, 4); static_assert(std::get<0>(p1) == 3, ""); static_assert(std::get<1>(p1) == 4, ""); } #endif }