That is, the computational complexity. Does it have to count all the elements? Does it depend on implementation? The SGI spec doesn't guarantee anything.
+4
A:
The current C++ standard doesn't specify a hash_set, so yes, it is implementation dependent. I find it a bit hard to imagine an acceptable implementation for which this wouldn't be constant time, however.
anon
2009-08-14 20:31:37
A:
Unspecified, as far as I know, but probably constant time. The Microsoft implementation is constant time.
Tim Sylvester
2009-08-14 20:51:16