1//===----------------------------------------------------------------------===// 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// <unordered_map> 11 12// template <class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>, 13// class Alloc = allocator<pair<const Key, T>>> 14// class unordered_map 15 16// mapped_type& operator[](const key_type& k); 17 18// http://llvm.org/bugs/show_bug.cgi?id=16542 19 20#include <unordered_map> 21 22#ifndef _LIBCPP_HAS_NO_VARIADICS 23 24#include <tuple> 25 26using namespace std; 27 28struct my_hash 29{ 30 size_t operator()(const tuple<int,int>&) const {return 0;} 31}; 32 33#endif 34 35int main() 36{ 37#ifndef _LIBCPP_HAS_NO_VARIADICS 38 unordered_map<tuple<int,int>, size_t, my_hash> m; 39 m[make_tuple(2,3)]=7; 40#endif 41} 42