C++ BOOST The Boost Lambda Library
Ž | Ž | Ž Next

# The Boost Lambda Library

Copyright Ž© 1999-2002 Jaakko JçÓvi, Gary Powell

The Boost Lambda Library is free software; Permission to copy, use, modify and distribute this software and its documentation is granted, provided this copyright notice appears in all copies.

## 1. In a nutshell

Boost Lambda Library(°Ê¹ßBLL)¤ÏC++¤Ë¤ª¤¤¤Æ¤Î ¦ËÃê¾Ý¤Î·¿¤ò¼ÂÁõ¤·¤¿C++¤Î¥Æ¥ó¥×¥ì¡¼¥È¥é¥¤¥Ö¥é¥ê¤Ç¤¢¤ë¡£ ¤³¤Î¸ÀÍÕ¤Ï¦ËÃê¾Ý¤Ë¤è¤Ã¤ÆÌµÌ¾¤Î´Ø¿ô¤òÄêµÁ¤¹¤ë´Ø¿ô·¿¸À¸ì¤ä¦Ë·×»»¤ËÍ³Íè¤¹¤ë¡£ BLL¤Î¼ç¤ÊÆ°µ¡¤ÏSTL¤Î¥¢¥ë¥´¥ê¥º¥à¤Î¤¿¤á¤ÎÌµÌ¾¤Î´Ø¿ô¥ª¥Ö¥¸¥§¥¯¥È¤òÄêµÁ¤¹¤ë½ÀÆð¤Ç´ÊÊØ¤ÊÊýË¡¤òÄó¶¡¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£ ¤³¤Î¥é¥¤¥Ö¥é¥ê¤Ë¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¤Ë¤¢¤¿¤Ã¤Æ¡¢´ÊÃ±¤Ê¥³¡¼¥É¤ò¸«¤ë¤Û¤¦¤¬Íý²ò¤·¤ä¤¹¤¤¡£ ¼¡¤Î°ì¹Ô¤Ï¤¢¤ëSTL¥³¥ó¥Æ¥Ê`a`¤ÎÍ×ÁÇ¤ò¶õÇò¤Ç¶èÀÚ¤Ã¤Æ½ÐÎÏ¤¹¤ë¡£

    for_each(a.begin(), a.end(), std::cout << _1 << ' ');

`std::cout << _1 << ' '`¤ÏÃ±¹à´Ø¿ô¥ª¥Ö¥¸¥§¥¯¥È¤òÄêµÁ¤·¤Æ¤¤¤ë¡£ ÊÑ¿ô`_1`¤Ï¤³¤Î´Ø¿ô¤Î²¾°ú¿ô¤Ç¤¢¤ê¡¢¼Â°ú¿ô¤Î¤¿¤á¤Î¥×¥ì¡¼¥¹¥Û¥ë¥À¡¼¤Ç¤¢¤ë¡£ `for_each`¤Î·«¤êÊÖ¤·¤Î¤¿¤Ó¤Ë¡¢¤³¤Î´Ø¿ô¤Ï`a`¤Î°ì¤Ä¤ÎÍ×ÁÇ¤ò¼Â°ú¿ô¤È¤·¤Æ¸Æ½Ð¤µ¤ì¤ë¡£ ¤³¤Î¼Â°ú¿ô¤Ï¥×¥ì¡¼¥¹¥Û¥ë¥À¡¼¤È¤·¤ÆÃê¾Ý²½¤µ¤ì¡¢¤³¤Î´Ø¿ô¤Î‘ËÜÂÎ’¤¬É¾²Á¤µ¤ì¤ë¡£

BLL¤ÎËÜ¼Á¤Ï¾å¤Ë¤¢¤²¤¿¤è¤¦¤Ê¾®¤µ¤ÊÌµÌ¾¤Î´Ø¿ô¥ª¥Ö¥¸¥§¥¯¥È¤ò¡¢STL¥¢¥ë¥´¥ê¥º¥à¤ò¸Æ½Ð¤¹°ÌÃÖ¤ÇÄ¾ÀÜÄêµÁ¤¹¤ë¤³¤È¤ò²ÄÇ½¤Ë¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£

Ž | Ž | Ž Next
Ž | Ž | Ž 2. Getting Started