https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107022

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to piersh from comment #4)
> struct my_hash
> {
>     my_hash() {}
>     my_hash(int i = 42) {}  // <<-- uncomment for bug
>     std::size_t operator()(const key &ep) const { return 0; }
> };

That is because my_hash constructor call with no arguments is ambigous at that
point. If you define one or the other constructor, it is no longer ambigous. If
you define both, the code is invalid.

Reply via email to