@@ -1602,12 +1602,12 @@ static inline std::string type_remap(const std::string& n1,
1602
1602
// since C++ does not have a operator+(std::string, std::wstring), we'll
1603
1603
// have to look up the same type and rely on the converters in
1604
1604
// CPyCppyy/_cppyy.
1605
- if (n1 == " str" || n1 == " unicode" ) {
1606
- // if (n2 ==
1607
- // "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>
1608
- // >")
1609
- // return n2; // match like for like
1610
- return " std::string " ; // probably best bet
1605
+ if (n1 == " str" || n1 == " unicode" || n1 == " std::basic_string<char> " ) {
1606
+ if (n2 == " std::basic_string<wchar_t> " )
1607
+ return " std::basic_string<wchar_t>& " ; // match like for like
1608
+ return " std::basic_string<char>& " ; // probably best bet
1609
+ } else if (n1 == " std::basic_string<wchar_t> " ) {
1610
+ return " std::basic_string<wchar_t>& " ;
1611
1611
} else if (n1 == " float" ) {
1612
1612
return " double" ; // debatable, but probably intended
1613
1613
} else if (n1 == " complex" ) {
@@ -1678,11 +1678,10 @@ Cppyy::TCppMethod_t Cppyy::GetGlobalOperator(
1678
1678
Cpp::GetOperator (scope, Cpp::Operator::OP_Greater, overloads);
1679
1679
else if (opname == " >=" )
1680
1680
Cpp::GetOperator (scope, Cpp::Operator::OP_GreaterEqual, overloads);
1681
- // FIXME: enabling `==` and `!=` requires friend operators
1682
- // else if (opname == "==")
1683
- // Cpp::GetOperator(scope, Cpp::Operator::OP_EqualEqual, overloads);
1684
- // else if (opname == "!=")
1685
- // Cpp::GetOperator(scope, Cpp::Operator::OP_ExclaimEqual, overloads);
1681
+ else if (opname == " ==" )
1682
+ Cpp::GetOperator (scope, Cpp::Operator::OP_EqualEqual, overloads);
1683
+ else if (opname == " !=" )
1684
+ Cpp::GetOperator (scope, Cpp::Operator::OP_ExclaimEqual, overloads);
1686
1685
else if (opname == " <<" )
1687
1686
Cpp::GetOperator (scope, Cpp::Operator::OP_LessLess, overloads);
1688
1687
else if (opname == " >>" )
0 commit comments