On Fri, Jul 17, 2015 at 2:13 PM, André Somers <an...@familiesomers.nl> wrote:
> Mark Gaiser schreef op 17-7-2015 om 13:44: > > > > You can use std::find_if for that on any container. > > Works for C++11 and even before that. C++11 gives the benefit of using > > a lambda in the std::find_if UnaryPredicate. > Sure, but wouldn't that revert you back to a linear search? That sounds > like getting the worst of both worlds: using a complicated red/black > tree data structure and then iterating over it lineary to find an item > that I could have found using the structure itself in logarithmic > time... Or am I overlooking some very clever specialization in the > find_if algorithm then? > > André Yes, that would give you linear search indeed. Guess you have to use that C++14 function then :)
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development