aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/stdcomplex.h
Commit message (Collapse)AuthorAgeFilesLines
* shiboken6: Add __int__, __float__Friedemann Kleint2023-09-051-0/+3
| | | | | | | | | | | | [ChangeLog][shiboken6] operator int() and/or operator double() on classes are now used to provide the __int__ and/or __float__ special functions enabling the use of int() and float() for numerical types. Fixes: PYSIDE-2446 Change-Id: Iabb6392b5754d6e31d44209cfdd27d38c5055b2c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken6: Add __abs__, __pow__Friedemann Kleint2023-09-051-0/+2
| | | | | | | | | | | | Add mapping for non-operator functions that serve as special nb slots. [ChangeLog][shiboken6] It is now possible to add the special functions __abs__ and __pow__, enabling the use of abs() and pow() for numerical types. Task-number: PYSIDE-2446 Change-Id: Iff4b88ad927273df5688c7350c0f45bb7618f05b Reviewed-by: Christian Tismer <tismer@stackless.com>
* Add some test for number protocol functionsFriedemann Kleint2023-08-311-0/+50
Add a basic complex number based on std::complex with some number protocols (note the name Complex is already taken by a primitive type in libsample). Pick-to: 6.5 Task-number: PYSIDE-2446 Change-Id: Ie1427761c0048f57a02bc8d59c3181567ce3a199 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>