blob: aa4d5999ff4666b2b51a8897db3a37d3c2068a3a [file] [log] [blame]
Howard Hinnantbbdf6692013-07-04 19:46:35 +00001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <map>
11
12// template <class Key, class T, class Compare = less<Key>,
13// class Allocator = allocator<pair<const Key, T>>>
14// class map
15
16// http://llvm.org/bugs/show_bug.cgi?id=16538
Howard Hinnantabb160e2013-07-05 18:06:00 +000017// http://llvm.org/bugs/show_bug.cgi?id=16549
Howard Hinnantbbdf6692013-07-04 19:46:35 +000018
19#include <map>
20
21struct Key {
22 template <typename T> Key(const T&) {}
23 bool operator< (const Key&) const { return false; }
24};
25
26int
27main()
28{
29 std::map<Key, int>::iterator it = std::map<Key, int>().find(Key(0));
Howard Hinnantabb160e2013-07-05 18:06:00 +000030 std::pair<std::map<Key, int>::iterator, bool> result =
31 std::map<Key, int>().insert(std::make_pair(Key(0), 0));
Howard Hinnantbbdf6692013-07-04 19:46:35 +000032}