/* Lecture Code 8.1
 *
 * The boost::unordered_set class, which represents a hash set.
 * There are similarly boost::unordered_map and hashed
 * multicontainers.  Note the syntactic similarity to the
 * existing containers.
 */
#include <iostream>
#include <boost/unordered_set.hpp>
using namespace std;
using namespace boost;

int main() {
	unordered_set<int> mySet;

	for(int i = 0; i < 10; i++)
		mySet.insert(i);

	if(mySet.find(5) != mySet.end())
		cout << "The set contains five." << endl;

	mySet.erase(4);
	cout << "The set contains ";
	cout << mySet.size() << " elements." << endl;
    
	for(unordered_set<int>::iterator itr = mySet.begin(); itr != mySet.end(); ++itr)
		cout << *itr << ' ';
	cout << endl;

	return 0;
}