¥é¥¤¥Ö¥é¥ê¤Ï¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Î¤ß¤Ç¹½À®¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢¥é¥¤¥Ö¥é¥ê¤òÍøÍѤ¹¤ë¤¿¤á¤ÎÆÃÊ̤ʼ곤¤Ï¤Ê¤¤¡£
¤¿¤À¤·¡¢boost ¤Î¥¤¥ó¥¯¥ë¡¼¥É¥Ç¥£¥ì¥¯¥È¥ê¤¬¥¤¥ó¥¯¥ë¡¼¥É¥Ñ¥¹¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
°Ê²¼¤Î¤è¤¦¤Ë°Û¤Ã¤¿µ¡Ç½¤òÄ󶡤¹¤ë¿ô¡¹¤Î¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¡£
The library consists of include files only, hence there is no
installation procedure. The boost include directory
must be on the include path.
There are a number of include files that give different functionality:
lambda/lambda.hpp ¤ÏÍÍ¡¹¤Ê C++ ¤Î±é»»»Ò¤Î¤¿¤á¤Î¦Ë¼°¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.2¤ò¸«¤è¡£
lambda/lambda.hpp defines lambda expressions for different C++
operators, see Section 5.2.
lambda/bind.hpp ¤Ï9¸Ä¤Þ¤Ç¤Î°ú¿ô¤Î¤¿¤á¤Î boost::bind ´Ø¿ô¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.3¤ò¸«¤è¡£
lambda/bind.hpp defines bind functions for up to 9 arguments, see Section 5.3.
lambda/if.hpp ¤Ï if ʸ¤ä¾ò·ï±é»»»Ò¤ÈÅù²Á¤Ê¦Ë´Ø¿ô¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.6¤ò¸«¤è¡£(lambda.hpp ¤â¸«¤ë¤³¤È¤òÁ¦¤á¤ë)¡£ lambda/if.hpp defines lambda function equivalents for if statements and the conditional operator, see Section 5.6 (includes lambda.hpp).
lambda/loops.hpp ¤Ï·«¤êÊÖ¤·¹½Â¤¤ÈÅù²Á¤Ê¦Ë´Ø¿ô¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.6¤ò¸«¤è¡£ lambda/loops.hpp defines lambda function equivalent for looping constructs, see Section 5.6.
lambda/switch.hpp ¤Ï switc ʸ¤ÈÅù²Á¤Ê¦Ë´Ø¿ô¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.6¤ò¸«¤è¡£ lambda/switch.hpp defines lambda function equivalent for the switch statement, see Section 5.6.
lambda/construct.hpp ¤Ï¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¥Ç¥¹¥È¥é¥¯¥¿¡¢new ¤ä delete ¤ò¸Æ½Ð¤¹¦Ë¼°¤òµ½Ò¤¹¤ë¥Ä¡¼¥ë¤òÄ󶡤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.8¤ò¸«¤è¡£(lambda.hpp¤â¸«¤ë¤³¤È¤òÁ¦¤á¤ë)¡£ lambda/construct.hpp provides tools for writing lambda expressions with constructor, destructor, new and delete invocations, see Section 5.8 (includes lambda.hpp).
lambda/casts.hpp ¤Ï¦Ë´Ø¿ô¤Î¤¿¤á¤Î¡¢¥¥ã¥¹¥È¤ä sizeof¡¢typeid ¤òÄêµÁ¤·¤Æ¤¤¤ë¡£¾Ü¤·¤¯¤ÏSection 5.10.1¤ò¸«¤è¡£ lambda/casts.hpp provides lambda versions of different casts, as well as sizeof and typeid, see Section 5.10.1.
lambda/exceptions.hpp ¤Ï¦Ë´Ø¿ôÆâ¤Ç¤ÎÎã³°¤òÁ÷½Ð¤·¤¿¤ê¡¢Ê䤹¤ë¼êÃʤòÄ󶡤¹¤ë¡£¾Ü¤·¤¯¤ÏSection 5.7¤ò¸«¤è¡£(lambda.hpp¤ò´Þ¤à) lambda/exceptions.hpp gives tools for throwing and catching exceptions within lambda functions, Section 5.7 (includes lambda.hpp).
lambda/algorithm.hpp ¤È lambda/numeric.hpp (ɸ½à¥é¥¤¥Ö¥é¥ê¤Î algortihm ¤È numeric ¥Ø¥Ã¥À¤ò»²¾È ) ¤Ï¥Í¥¹¥È¤·¤¿ STL ¥¢¥ë¥´¥ê¥º¥à¤Î¸Æ¤Ó½Ð¤·¤ò²Äǽ¤Ë¤¹¤ë¡£¾Ü¤·¤¯¤ÏSection 5.11¤ò¸«¤è¡£ lambda/algorithm.hpp and lambda/numeric.hpp (cf. standard algortihm and numeric headers) allow nested STL algorithm invocations, see Section 5.11.
Á´¤Æ¤ÎÄêµÁ¤Ï boost::lambda ¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤È¤½¤Î¥µ¥Ö¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ë°¤¹¤ë¡£ All definitions are placed in the namespace boost::lambda and its subnamespaces.
¿¤¯¤Î¥³¡¼¥ÉÎã¤Ç¤Ï¡¢std ¤È boost::lambda ¤Î̾Á°¶õ´Ö¤Î̾Á°¤ÎÀÜÆ¬¼¤ò¾Êά¤·¤Æ¤¤¤ë¡£¤½¤Î¤¿¤á»ö¼Â¾å°ÅÌÛŪ¤Ë¡¢
using namespace std; using namespace boost::lambda;¤È¤¤¤¦ÄêµÁ¤¬¤¢¤ë¤È²¾Äꤷ¤Æ¤¤¤ë¡£