On Thu, Oct 25, 2012 at 5:03 PM, Lawrence Crowl <cr...@googlers.com> wrote:
> Change hash_table to support a comparator type different from the
> value type stored in the hash table.  The 'find' functions now may
> take a different type from the value type.  This requires introducing
> a second typedef into the Descriptor conceptual type.  Change the
> Descriptor concept to use typedefs value_type and compare_type instead
> of T.  Change all users to match.
>
> Add usage documentation to hash-table.h.
>
> Tested on x86-64.
>
> Okay for trunk?
>
>
> Index: gcc/ChangeLog
>
> 2012-10-25  Lawrence Crowl  <cr...@google.com>
>
>         * hash-table.h: Add usage documentation.
>         (template struct typed_free_remove): Clarify documentation.
>         Rename template parameter.
>         (struct typed_noop_remove): Likewise.
>         (descriptor concept): Change typedef T to value_type.
>         Add typedef compare_type.  Use more precise template parameter name,
>         Descriptor instead of Descr.  Update users to match.
>         (struct hash_table): Change 'find' parameters to use compare_type
>         instead of the value type.
OK.  Thanks for the documentation!


Andrew, this will now let you use different types in the comparator routines.


Diego.

Reply via email to