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.