@@ -1652,11 +1652,10 @@ void Cppyy::GetClassOperators(Cppyy::TCppScope_t klass,
1652
1652
Cpp::GetOperator (klass, Cpp::Operator::OP_Greater, operators);
1653
1653
else if (opname == " operator>=" )
1654
1654
Cpp::GetOperator (klass, Cpp::Operator::OP_GreaterEqual, operators);
1655
- // FIXME: enabling `==` and `!=` requires friend operators
1656
- // else if (opname == "operator==")
1657
- // Cpp::GetOperator(klass, Cpp::Operator::OP_EqualEqual, operators);
1658
- // else if (opname == "operator!=")
1659
- // Cpp::GetOperator(klass, Cpp::Operator::OP_ExclaimEqual, operators);
1655
+ else if (opname == " operator==" )
1656
+ Cpp::GetOperator (klass, Cpp::Operator::OP_EqualEqual, operators);
1657
+ else if (opname == " operator!=" )
1658
+ Cpp::GetOperator (klass, Cpp::Operator::OP_ExclaimEqual, operators);
1660
1659
else if (opname == " operator<<" )
1661
1660
Cpp::GetOperator (klass, Cpp::Operator::OP_LessLess, operators);
1662
1661
else if (opname == " operator>>" )
@@ -1665,6 +1664,10 @@ void Cppyy::GetClassOperators(Cppyy::TCppScope_t klass,
1665
1664
Cpp::GetOperator (klass, Cpp::Operator::OP_Amp, operators);
1666
1665
else if (opname == " operator|" )
1667
1666
Cpp::GetOperator (klass, Cpp::Operator::OP_Pipe, operators);
1667
+ else if (opname == " operator()" )
1668
+ Cpp::GetOperator (klass, Cpp::Operator::OP_Call, operators);
1669
+ else if (opname == " operator[]" )
1670
+ Cpp::GetOperator (klass, Cpp::Operator::OP_Subscript, operators);
1668
1671
}
1669
1672
1670
1673
Cppyy::TCppMethod_t Cppyy::GetGlobalOperator (
@@ -1707,6 +1710,11 @@ Cppyy::TCppMethod_t Cppyy::GetGlobalOperator(
1707
1710
Cpp::GetOperator (scope, Cpp::Operator::OP_Amp, overloads);
1708
1711
else if (opname == " |" )
1709
1712
Cpp::GetOperator (scope, Cpp::Operator::OP_Pipe, overloads);
1713
+ else if (opname == " ()" )
1714
+ Cpp::GetOperator (scope, Cpp::Operator::OP_Call, overloads);
1715
+ else if (opname == " []" )
1716
+ Cpp::GetOperator (scope, Cpp::Operator::OP_Subscript, overloads);
1717
+
1710
1718
1711
1719
std::vector<Cppyy::TCppMethod_t> unresolved_candidate_methods;
1712
1720
for (auto overload: overloads) {
0 commit comments