cont/unordinspect1.cpp

The following code example is taken from the book
The C++ Standard Library - A Tutorial and Reference, 2nd Edition
by Nicolai M. Josuttis, Addison Wesley Longman, 2012
Copyright © 2012 by Pearson Education, Inc. and Nicolai M. Josuttis


#include <unordered_set>
#include <iostream>
#include "buckets.hpp"

int main()
{
    // create and initialize an unordered set
    std::unordered_set<int> intset = { 1,2,3,5,7,11,13,17,19 };
    printHashTableState(intset);

    // insert some additional values (might cause rehashing)
    intset.insert({-7,17,33,4});
    printHashTableState(intset);
}