1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class T1, class T2> struct pair
14 // void swap(pair& p);
23 S * operator& () { assert(false); return this; }
24 S const * operator& () const { assert(false); return this; }
25 bool operator==(int x) const { return i == x; }
31 typedef std::pair<int, short> P1;
32 P1 p1(3, static_cast<short>(4));
33 P1 p2(5, static_cast<short>(6));
35 assert(p1.first == 5);
36 assert(p1.second == 6);
37 assert(p2.first == 3);
38 assert(p2.second == 4);
41 typedef std::pair<int, S> P1;
45 assert(p1.first == 5);
46 assert(p1.second == 6);
47 assert(p2.first == 3);
48 assert(p2.second == 4);