@@ -1847,7 +1847,7 @@ bool CPyCppyy::Pythonize(PyObject* pyclass, Cppyy::TCppScope_t scope)
18471847 Utility::AddToClass (pyclass, " __iter__" , (PyCFunction)PyObject_SelfIter, METH_NOARGS);
18481848 }
18491849
1850- else if (name == " std::basic_string<char>" ) { // TODO: ask backend as well
1850+ else if (name == " std::basic_string<char>" || name == " basic_string<char> " ) { // TODO: ask backend as well
18511851 Utility::AddToClass (pyclass, " __repr__" , (PyCFunction)STLStringRepr, METH_NOARGS);
18521852 Utility::AddToClass (pyclass, " __str__" , (PyCFunction)STLStringStr, METH_NOARGS);
18531853 Utility::AddToClass (pyclass, " __bytes__" , (PyCFunction)STLStringBytes, METH_NOARGS);
@@ -1868,12 +1868,12 @@ bool CPyCppyy::Pythonize(PyObject* pyclass, Cppyy::TCppScope_t scope)
18681868 ((PyTypeObject*)pyclass)->tp_hash = (hashfunc)STLStringHash;
18691869 }
18701870
1871- else if (name == " std::basic_string_view<char>" ) {
1871+ else if (name == " std::basic_string_view<char>" || name == " basic_string_view<char> " ) {
18721872 Utility::AddToClass (pyclass, " __real_init" , " __init__" );
18731873 Utility::AddToClass (pyclass, " __init__" , (PyCFunction)StringViewInit, METH_VARARGS | METH_KEYWORDS);
18741874 }
18751875
1876- else if (name == " std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >" ) {
1876+ else if (name == " std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >" || name == " basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > " ) {
18771877 Utility::AddToClass (pyclass, " __repr__" , (PyCFunction)STLWStringRepr, METH_NOARGS);
18781878 Utility::AddToClass (pyclass, " __str__" , (PyCFunction)STLWStringStr, METH_NOARGS);
18791879 Utility::AddToClass (pyclass, " __bytes__" , (PyCFunction)STLWStringBytes, METH_NOARGS);
0 commit comments