xref: /minix3/external/bsd/libc++/dist/libcxx/test/extensions/hash_map/const_iterator.fail.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
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 #include <ext/hash_map>
11 
main()12 int main()
13 {
14     __gnu_cxx::hash_map<int, int> m;
15     m[1] = 1;
16     const __gnu_cxx::hash_map<int, int> &cm = m;
17     cm.find(1)->second = 2;  // error
18 }
19