Archive for the ‘General Coding’ Category

  • Lambda expressions in C++

    on Feb 11, 09 • by Denis Sidorov • with 5 Comments

    Have just stumbled across the lamda module in boost (popular C++ general-purpose library known for extensive usage of templates and influence on C++ standard committee). A quote: The primary motivation for the BLL (Boost Lambda Library) is to provide flexible and convenient means to define unnamed function objects for STL algorithms … for_each(a.begin(), a.end(), std::cout &lt;&lt; _1 &lt;&lt; ' '); My first thought was: "Hmm ... a macro?" It appears it is not. The <code>_1 object is a lambda placeholder, and should be read as first parameter of lambda expression (a.k.a. unnamed function). In fact

    Read More »
Scroll to top