1be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//===----------------------------------------------------------------------===//
2be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//
3be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//                     The LLVM Compiler Infrastructure
4be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//
5be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne// This file is dual licensed under the MIT and the University of Illinois Open
6be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne// Source Licenses. See LICENSE.TXT for details.
7be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//
8be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne//===----------------------------------------------------------------------===//
9be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne
10be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne#include <ext/hash_map>
11be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne
12be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourneint main()
13be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne{
14be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne    __gnu_cxx::hash_map<int, int> m;
15be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne    m[1] = 1;
16be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne    const __gnu_cxx::hash_map<int, int> &cm = m;
17be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne    cm.find(1)->second = 2;  // error
18be8a99ad0f5cfccb64eec53b7d3ac945f55040bbPeter Collingbourne}
19