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

--- Comment #4 from Shreyans Doshi <shreyans.doshi94 at gmail dot com> ---
Yeah, I checked that scenario as well. Logically both are same, but
compiler doesn't agree to that.
But as pointed out by other members, it is not just the compiler,
surprisingly it is not present in the standard itself. So, I guess I'll
have to propose it C++ std committee.

Thanks for looking into it anyways.

Regards
Shreyans

On Mon, Apr 22, 2019 at 6:34 PM redi at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90203
>
> --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
> (In reply to Shreyans Doshi from comment #0)
> >
> > Surprisingly, const pair<int, int> and pair<const int, int> are not
> > comparable, which it should be in such cases. Ideally, if a container is
> > const, it should imply that all the underlying members are also const.
> >
>
> const pair<T, T> does imply the members are const, but it's still not the
> same
> type as pair<const int, const int>, and so isn't comparable.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.

Reply via email to