Boost logo

Boost Users :

Subject: Re: [Boost-users] Using unordered_set or unordered_map to hold small array(s) of ints
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-08-20 18:32:31

Please do not top-post.

On Fri, Aug 20, 2010 at 4:07 PM, B Hart <bhartsb_at_[hidden]> wrote:
> Just a comparison function?  How is, for example, unordered set going to
> know the end of the array, to hash it?  I don't know what is happening
> under-the-hood so I'm deferring to the list experts.
> Can you give me a simple example?

How is it going to know the end?
  That depends on how you create your array and set up your hash
function. If you have an end-of-array marker then you would stop at
that (like how '\0' is the end-of-array marker for C strings), if it
is a static length then you would just use that, etc...

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at