Articles contenant le tag STL
Why does std::for_each return the Functor ?
Posté par Olivier dans Trucs & Astuces le 9 décembre 2010
In short: Because the provided Functor is copied by for_each. A bit longer: the functor has to be copied so that for_each can use a reference to it in the loopage as the functor is copied, the context of the functor would be lost at end of for_each if it was not returned class Object […]