Papierkorb / bindgen

Binding and wrapper generator for C/C++ libraries
GNU General Public License v3.0
179 stars 18 forks source link

Support non-member overloaded operators #109

Closed HertzDevil closed 3 years ago

HertzDevil commented 3 years ago

Wraps overloaded operators that are not instance methods, as long as their first parameter accepts a wrapped type by (non-const or const) lvalue reference. The operators are transformed into methods by the Clang parser entirely; it makes no differences to Bindgen whether a given operator was defined as a method or not.

On Qt5.cr this mainly affects the geometric object types (QLine, QRect, QPolygon, QTransform, and so on).

Papierkorb commented 3 years ago

This looks great, thanks!