blob: bb6661f7966ce23d0abb508443f4191144858559 [file] [log] [blame]
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00001//===----------------------------------------------------------------------===//
2//
Howard Hinnantf5256e12010-05-11 21:36:01 +00003// The LLVM Compiler Infrastructure
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00004//
Howard Hinnantb64f8b02010-11-16 22:09:02 +00005// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
Howard Hinnantbc8d3f92010-05-11 19:42:16 +00007//
8//===----------------------------------------------------------------------===//
9
10// <utility>
11
12// template <class T1, class T2> struct pair
13
14// constexpr pair();
15
16#include <utility>
17#include <cassert>
18
19int main()
20{
Marshall Clow206f6cd2013-07-16 17:45:44 +000021 {
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000022 typedef std::pair<float, short*> P;
23 P p;
24 assert(p.first == 0.0f);
25 assert(p.second == nullptr);
Howard Hinnantab61b2c2013-08-07 19:39:48 +000026 }
Dan Albert1d4a1ed2016-05-25 22:36:09 -070027
28#if _LIBCPP_STD_VER > 11
Marshall Clow206f6cd2013-07-16 17:45:44 +000029 {
Dan Albert1d4a1ed2016-05-25 22:36:09 -070030 typedef std::pair<float, short*> P;
31 constexpr P p;
32 static_assert(p.first == 0.0f, "");
33 static_assert(p.second == nullptr, "");
Marshall Clow206f6cd2013-07-16 17:45:44 +000034 }
35#endif
Howard Hinnantbc8d3f92010-05-11 19:42:16 +000036}