This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use an std::vector for inline_states
Hi,
I remembered now that I forgot so point at something that I had wanted
to mention before.
It's that I think that this:
> +template <typename T>
> +T
> +unordered_remove (std::vector<T> &vec, typename std::vector<T>::iterator it)
> +{
won't work as is with gdb::def_vector/gdb::byte_vector, because the above
assumes std::vector has a single template parameter, while in reality it
has two.
I think this can either be fixed by adding an allocator template parameter
to unordered_remove:
template<typename T, typename A>
void
unordered_erase (std::vector<T, A> &v,
typename std::vector<T, A>::iterator pos)
or by making the whole vector/container type a template like in
my example:
template<typename Vector>
void
unordered_erase (Vector &v, typename Vector::iterator pos)
Thanks,
Pedro Alves