Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Creating Unnamed Functions with the Lambda Library

Defining an unnamed function directly on the call site of an algorithm can be very useful but is it even possible? Yes it is! Find out how using lambda expressions can simplify your use of STL algorithms.


advertisement
A lambda expression enables you to define an unnamed function—directly on the call site of an algorithm. Such unnamed functions are chiefly useful in functional programming, generic libraries, and scientific applications. However, even mainstream C++ applications can benefit from the higher-order programming concepts of lambda abstractions. The following sections show how TR1's lambda library can simplify the usage of STL algorithms.


How can you create small, unnamed functions directly on the call site of an STL algorithm?


Use the lambda library for implementing lambda functors.





Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap