This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/68880] [4.9 Regression][Bisected to r202992] std::operator< overload ignored when using std::lower_bound
- From: "fdumont at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 13 Dec 2015 14:54:07 +0000
- Subject: [Bug libstdc++/68880] [4.9 Regression][Bisected to r202992] std::operator< overload ignored when using std::lower_bound
- Auto-submitted: auto-generated
- References: <bug-68880-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68880
--- Comment #1 from FranÃois Dumont <fdumont at gcc dot gnu.org> ---
Not sure it is a regression. Of course before the patch the operator was called
in namespace std so your operator was considered. Now we are using intermediate
functor that are not in std namespace so your operator is hidden to those
functors.
I don't think the Standard is saying that we should consider namespace std in
this context. So your best choice is simply to put your operator in namespace N
rather than polluting the std one. I hope someone with higher C++ Standard
knowledge will confirm.