vendredi 21 avril 2017

C++ 03 equivalent of C++11 lambda

Referring to my previous question, as the explanation is required in detail. How is the following code snippet working, fundamental and C++ 03 equivalent ?

 auto get_option_name = [](const std::pair<const std::string, std::string>& p) -> const std::string& {
    return p.first;
 };

Aucun commentaire:

Enregistrer un commentaire