1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include <ext/hash_map>
10 
main(int,char **)11 int main(int, char**)
12 {
13     __gnu_cxx::hash_map<int, int> m;
14     m[1] = 1;
15     const __gnu_cxx::hash_map<int, int> &cm = m;
16     cm.find(1)->second = 2;  // error
17 
18   return 0;
19 }
20