On Monday, 27 July 2026 03:20:07 Pacific Daylight Time Marc Mutz via Development wrote: > The std already forbids taking the address of (any, not just member) > function, and the solution is to wrap the call in a lambda and pass that > instead (which may decay to a function pointer, if needed). > > So, yes, we may want to tell users not to take addresses of > non-signal/non-slot Qt functions, member or not.
The connection mechanism is slightly more efficient when you pass a function pointer, member or not, because it can tell what arguments you meant to receive. When you pass a functor/lambda, the receiver may itself have overloads or may be a template, so we can't do that. That means we can't look at the receiver's arguments to do interesting things; instead, we must try things and see if they compile. -- Thiago Macieira - thiago.macieira (AT) intel.com Principal Engineer - Intel DCG - Platform & Sys. Eng.
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
