/*rehashing for quadratic probing hash table *void rehashvector oldarray array/create new double-sizedempty table array resizenextprime oldarray size)forauto entry array entry info empty/copy table over currentsize forauto entry oldarray ifentry info =active insertstd::moveentry element )/*rehashing for separate chaining hash table *void rehashvectoroldlists thelists/create new double-sizedempty table thelists resizenextprime thelists size)forauto thislist thelists thislist clear)/copy table over currentsize forauto thislist oldlists forauto thislist insertstd::movex )figure rehashing for both separate chaining hash tables and probing hash tables also be instantiated with function object that provides (or overrides defaultcomparison functionunordered_set and unordered_map can be instantiated with function objects that provide hash function and equality operator thusfor examplefigure illustrates how an unordered set of case-insensitive strings can be maintainedassuming that some string operations are implemented elsewhere