Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
Howard Hinnant | 5b08a8a | 2010-05-11 21:36:01 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame] | 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // <tuple> |
| 11 | |
| 12 | // template <class... Types> class tuple; |
| 13 | |
| 14 | // template<class... Types> |
| 15 | // tuple<Types&...> tie(Types&... t); |
| 16 | |
| 17 | #include <tuple> |
| 18 | #include <string> |
| 19 | #include <cassert> |
| 20 | |
| 21 | int main() |
| 22 | { |
| 23 | { |
| 24 | int i = 0; |
| 25 | std::string s; |
| 26 | std::tie(i, std::ignore, s) = std::make_tuple(42, 3.14, "C++"); |
| 27 | assert(i == 42); |
| 28 | assert(s == "C++"); |
| 29 | } |
| 30 | } |