[Bug libstdc++/40804] STL: operator>= for pair "hides" general operator>= from std::rel_ops
mariofutire at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sun Jul 19 17:29:00 GMT 2009
------- Comment #3 from mariofutire at googlemail dot com 2009-07-19 17:29 -------
I have removed one of the "using" and still get the same problem:
#include <utility>
#include <functional>
using namespace std::rel_ops;
struct A
{
bool operator<(const A &) const;
};
void foo1()
{
bool ok = A() >= A(); // just to check rel_ops is actually included
}
void foo2()
{
std::greater_equal<A> ge;
bool bad = ge(A(), A());
}
An alternative way is to replace the "using namespace std::rel_ops;" with
using std::rel_ops::operator>=;
but this means I have to repeat it for every operator I need.
Is there an other way to make all operators defined in rel_ops available?
--
mariofutire at googlemail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40804
More information about the Gcc-bugs
mailing list