]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/unordered/doc/src_code/intro.cpp
2 // Copyright 2006-2009 Daniel James.
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 #include <boost/unordered_map.hpp>
8 #include <boost/foreach.hpp>
15 typedef boost::unordered_map
<std::string
, int> map
;
21 assert(x
.at("one") == 1);
22 assert(x
.find("missing") == x
.end());
26 BOOST_FOREACH(map::value_type i
, x
) {
27 std::cout
<<i
.first
<<","<<i
.second
<<"\n";