[Development] Proposal: Deprecating platforms in Qt 5.6 that don't support lambda

Thiago Macieira thiago.macieira at intel.com
Fri Feb 20 17:07:25 CET 2015


On Friday 20 February 2015 12:52:31 André Somers wrote:
> > If you wanted to support, implement, say,
> >       QSortFilterProxyModel::setFilter(
> >               cont std::function<bool(int, const QModelIndex&)> &filter)
> > 
> > You would need a generic general purpose QFunction. For which you can
> > specify the arguments as template parameter.
> 
> Ok, thanks for the clarification. And that's exactly the kind of thing 
> I'd like to see supported. Though I'd rather not have the QFunction 
> then, but just be able to use std::function.

A QFunction<T> needs to accept an argument of std::function<T> just as much as 
it needs to accept a real function of type T, so whether we take one or the 
other in our ABI would not diminish your capabilities in any way.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list