{"width":"100%","published":"2012-01-18 00:00:00","image_url":null,"categories":["C++","Boost"],"url":"https://yohhoy.hatenadiary.jp/entry/20120118/p1","blog_title":"yohhoy\u306e\u65e5\u8a18","title":"iota\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0","type":"rich","height":"190","blog_url":"https://yohhoy.hatenadiary.jp/","version":"1.0","provider_url":"https://hatena.blog","description":"C++11\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u65b0\u3057\u304f\u8ffd\u52a0\u3055\u308c\u305f\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0std::iota\u306b\u3064\u3044\u3066\u30e1\u30e2\u3002 \u30b7\u30fc\u30b1\u30f3\u30b9\u8981\u7d20\u3078\u6607\u9806\u3067\u9023\u7d9a\u5024\u3092\u4ee3\u5165\u3059\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3002 \u6700\u521d\u306fitoa\u304b\u3068\u601d\u3044\u300c\u306a\u305c\u306b\u4eca\u66f4\uff1f\u6a19\u6e96\u5316\u3057\u305f\u306e\uff1f\u300d \u30ae\u30ea\u30b7\u30e3\u6587\u5b57\u306e \u03b9/\u30a4\u30aa\u30bf \u304b\u3089\u6765\u3066\u3044\u308b\u3089\u3057\u3044\u3002\u6c5f\u6dfb\u3055\u3093\u306e\u672c\u306e\u866b \u304c\u8a73\u3057\u3044\u3002 Boost.Range\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306f Range\u30d9\u30fc\u30b9\u7248iota \u304c\u5b58\u5728\u3059\u308b\u3002 #include <algorithm> int a[5]; std::iota(a, a+5, 1); // a == {1,2,3,4,5} #include <boost/range/algorithm_ext/iota.hpp> int \u2026","author_url":"https://blog.hatena.ne.jp/yohhoy/","author_name":"yohhoy","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20120118%2Fp1\" title=\"iota\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0 - yohhoy\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog"}