Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame^] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure |
| 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 | // constexpr tuple(); |
| 15 | |
| 16 | #include <tuple> |
| 17 | #include <string> |
| 18 | #include <cassert> |
| 19 | |
| 20 | #include "../DefaultOnly.h" |
| 21 | |
| 22 | int main() |
| 23 | { |
| 24 | { |
| 25 | std::tuple<> t; |
| 26 | } |
| 27 | { |
| 28 | std::tuple<int> t; |
| 29 | assert(std::get<0>(t) == 0); |
| 30 | } |
| 31 | { |
| 32 | std::tuple<int, char*> t; |
| 33 | assert(std::get<0>(t) == 0); |
| 34 | assert(std::get<1>(t) == nullptr); |
| 35 | } |
| 36 | { |
| 37 | std::tuple<int, char*, std::string> t; |
| 38 | assert(std::get<0>(t) == 0); |
| 39 | assert(std::get<1>(t) == nullptr); |
| 40 | assert(std::get<2>(t) == ""); |
| 41 | } |
| 42 | { |
| 43 | std::tuple<int, char*, std::string, DefaultOnly> t; |
| 44 | assert(std::get<0>(t) == 0); |
| 45 | assert(std::get<1>(t) == nullptr); |
| 46 | assert(std::get<2>(t) == ""); |
| 47 | assert(std::get<3>(t) == DefaultOnly()); |
| 48 | } |
| 49 | } |