{"blog_url":"https://potisan-programming-memo.hatenablog.jp/","url":"https://potisan-programming-memo.hatenablog.jp/entry/2021/01/28/225750","author_url":"https://blog.hatena.ne.jp/potisan/","type":"rich","author_name":"potisan","published":"2021-01-28 22:57:50","provider_name":"Hatena Blog","width":"100%","title":"C++20 std::ranges::subrange\u306e\u30e1\u30f3\u30d0\u30fc\u95a2\u6570\u4f7f\u7528\u4f8b\uff08Microsoft Visual Studio 2019 Community 16.9.0 Preview 3\uff09","image_url":null,"version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2021%2F01%2F28%2F225750\" title=\"C++20 std::ranges::subrange\u306e\u30e1\u30f3\u30d0\u30fc\u95a2\u6570\u4f7f\u7528\u4f8b\uff08Microsoft Visual Studio 2019 Community 16.9.0 Preview 3\uff09 - potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["C++","STL"],"provider_url":"https://hatena.blog","height":"190","blog_title":"potisan\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30e1\u30e2","description":"Microsoft Visual Studio 2019 Community 16.9.0 Preview 3\u306b\u304a\u3051\u308bstd::ranges::subrange\u306e\u30e1\u30f3\u30d0\u30fc\u95a2\u6570\u4f7f\u7528\u4f8b\u3067\u3059\u3002 #include <ranges> #include <vector> int main() { std::vector v{ 0, 1, 2, 3, 4 }; // std::ranges::subrange r{ v }; std::ranges::subrange r(v.cbegin(), v.cend()); // \u30a4\u30c6\u30ec\u30fc\u30bf\u30fc\u306e\u53d6\u5f97 auto begin = r.begin(); // v.cbe\u2026"}