[RFC] Come up with is_empty for hash_{table,map,set}.

Richard Biener richard.guenther@gmail.com
Mon Apr 29 12:01:00 GMT 2019


On Mon, Apr 29, 2019 at 10:40 AM Martin Liška <mliska@suse.cz> wrote:
>
> On 4/26/19 10:37 PM, Bernhard Reutner-Fischer wrote:
> > On 26 April 2019 14:07:20 CEST, Richard Biener <richard.guenther@gmail.com> wrote:
> >> On Fri, Apr 26, 2019 at 11:26 AM Martin Liška <mliska@suse.cz> wrote:
> >>>
> >>> Hi.
> >>>
> >>> We do have vec<...>::is_empty function, but not for
> >> hash_{table,map,set}.
> >>> Would you mind adding the function and using it? If so, I can prepare
> >>> a complete patch that will replace all usages of 'elements () > 0',
> >> '!elements ()', ...
> >>
> >> Works for me.
> >
> > Being internal, maybe the shorter empty_p()?
>
> I would prefer to stay with is_empty as it will be aligned with vec<..>::is_empty.
>
> I'm sending updated version of the patch that I've been testing.

OK.

Richard.

> Martin
>
> >
> > thanks,
> >
>



More information about the Gcc-patches mailing list