Re: [RFA 01/22] Change selttest.c to use use std::vector

Pedro Alves
2016-10-06T00:18:57Z

On 09/27/2016 04:55 PM, Tom Tromey wrote:
> Trevor> I'd agree, hopefully we can throw VEC in the trash some day. Relatedly
> Trevor> we should probably move gcc's hash table stuff to include/ sooner rather
> Trevor> than later so we can similarly get rid of htab.
>
> That would be nice; though we could probably use std::set and std::map
> in gdb as well.

std::unordered_map (hash table) would be a more direct replacement.
See gold/system.h -- for C++03 compilers, gold uses unordered_map (and
unordered_set) from std::tr1 if available, otherwise falls back to
std::map (balanced binary tree, usually red/black), with even
older compilers. The idea being that you'll be able to use gold with
older compilers, though it'll run slower.

Thanks,
Pedro Alves