ãã®ã¨ã³ããªã¯ãBoost Advent Calendar 2011ã®åå è¨äºã§ãã Boost Range Libraryã¯ãBoost 1.43.0ã«ããã¦ãã¼ã¸ã§ã³2ã«ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã¢ããããRangeã«å¯¾ããã¢ã«ã´ãªãºã ã¨ãRangeã¢ããã¿ã¨ãã大ãã2ã¤ã®æ©è½ãå°å
¥ããã¾ããã Rangeã¢ã«ã´ãªãºã ã¯ãæ¢åã®ã¤ãã¬ã¼ã¿ã®çµã¿ãå¼æ°ã«ã¨ãSTLã¢ã«ã´ãªãºã ãä¸æ®µæ½è±¡åããã³ã³ãããé
åã®ãããªRange(ç¯å²)ãã¨ãããã«ãããã®ã§ãã std::vector<T> v; for_each(v, f); ããã«ãã£ã¦ããã³ã³ããå
¨ã¦ã«ã¢ã«ã´ãªãºã ãé©ç¨ãããã¨ãããããªå¦çãç°¡æ½ã«è¨è¿°ã§ããããã«ãªãã for_each(a.begin(), b.end(), f); ã®ããã«ãééã£ã¦ç°ãªãå¤æ°ãç¯å²ã¨ãã¦æ¸¡ãã¦ãã¾ããããªãã°ãåãè¾¼ãå¯è½æ§ãæ¸ããã¦ããã¾ãã Ran
{{#tags}}- {{label}}
{{/tags}}