Fri Apr 17 17:32:31 CEST 2009 Tobias Rautenkranz * C++ overload resolution diff -rN -u old-doc/introduction.docbook new-doc/introduction.docbook --- old-doc/introduction.docbook 2014-10-30 07:13:29.000000000 +0100 +++ new-doc/introduction.docbook 2014-10-30 07:13:29.000000000 +0100 @@ -25,8 +25,6 @@ Bad multithreaded performance due to a lock for the global hash-tables. - No C++ style argument conversion / overload resolution. - No custom overloading methods by argument count. Limited conversions. E.g. QList<T> is missing. 10 seconds startup time (for qt.examples) on a diff -rN -u old-doc/smoke.docbook new-doc/smoke.docbook --- old-doc/smoke.docbook 2014-10-30 07:13:29.000000000 +0100 +++ new-doc/smoke.docbook 2014-10-30 07:13:29.000000000 +0100 @@ -24,7 +24,7 @@ (make-instance 'qt:object) -Suppy arguments as list to the :args keyword: +Supply arguments as list to the :args keyword: (let ((parent (make-instance 'qt:object))) @@ -54,6 +54,26 @@ (frob my-instance 1) +
Overload Resolution + +C++ style overload resolution with conversion sequences is under development, +but already usable. For example this: + + +(cxx:set-pen (make-instance 'qt:painter) + (make-instance 'qt:color :args '("green"))) + + +is equivalent to: + + +(cxx:set-pen (make-instance 'qt:painter) "green") + + +In the second case a temporary qt:color instance is implicitly created. + +
+
defmethod You can extend the :cxx generic functions by