Add RequireInputIter on unordered containers

Jonathan Wakely jwakely@redhat.com
Wed Sep 19 09:02:00 GMT 2018


On 19/09/18 08:16 +0200, François Dumont wrote:
>Unordered containers are missing the std::_RequireInputIter. Even if 
>deduction guides do have them.

Because that's what the standard requires, see [unord.req] p17.

17 A deduction guide for an unordered associative container shall not participate in overload resolution if any of
the following are true:
— It has an InputIterator template parameter and a type that does not qualify as an input iterator is
deduced for that parameter.
— It has an Allocator template parameter and a type that does not qualify as an allocator is deduced
for that parameter.
— It has a Hash template parameter and an integral type or a type that qualifies as an allocator is deduced
for that parameter.
— It has a Pred template parameter and a type that qualifies as an allocator is deduced for that parameter.

There's no such constraint for the constructors.

It looks like we're not following the last two bullets though. We
don't constrain the Hash and Pred parameters.




More information about the Libstdc++ mailing list