hash set decrement iterator?

A

aaragon

Hello everyone,

I've been trying to create a hashed container to realize that it
doesn't provide decrement iterators?????
Anyone has an idea why is this?

aa
 
S

Salt_Peter

Hello everyone,

I've been trying to create a hashed container to realize that it
doesn't provide decrement iterators?????
Anyone has an idea why is this?

aa

hash_set is not part of the standard. So you won't find any guarantees
about what type of iterator hash_set is required to have. You would
need one with bidirectional iterators i presume.
SGI implements hash_set with input iterators i beleive, GNU uses
forward iterators, MSVC and Dinkum have bidirectional iterators.
 
J

James Kanze

hash_set is not part of the standard. So you won't find any
guarantees about what type of iterator hash_set is required to
have. You would need one with bidirectional iterators i
presume. SGI implements hash_set with input iterators i
beleive, GNU uses forward iterators, MSVC and Dinkum have
bidirectional iterators.

The unordered_set in the proposed revision of the standard
requires "at least" forward_iterator. So you can't count on
more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,167
Messages
2,570,910
Members
47,453
Latest member
MadelinePh

Latest Threads

Top