1// Copyright 2022 Peter Dimov
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/unordered_map.hpp>
6#include <boost/core/lightweight_test.hpp>
7#include <string>
8
9int main()
10{
11 boost::unordered_map<std::string, int> map;
12
13 map[ "2" ] = 2;
14
15 BOOST_TEST_EQ( map[ "1" ], 0 );
16 BOOST_TEST_EQ( map[ "2" ], 2 );
17
18 return boost::report_errors();
19}
20

source code of boost/libs/unordered/test/quick.cpp