<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pebble8888</author_name>
  <author_url>https://blog.hatena.ne.jp/pebble8888/</author_url>
  <blog_title>Pebble Coding</blog_title>
  <blog_url>https://pebble8888.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>C++11でstd::vectorを範囲forできるようになりましたが、逆順にはできませんでした。 C++20のrangesにより逆順で範囲forできるようになりました。 #include &lt;vector&gt; #include &lt;ranges&gt; std::vector&lt;int&gt; v = {0, 1, 2, 3}; for (const auto&amp; a: v | std::views::reverse) { printf(&quot;%d &quot;, a); } 3 2 1 0</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpebble8888.hatenablog.com%2Fentry%2F2024%2F03%2F23%2F213613&quot; title=&quot;C++20でstd::vectorを範囲forを逆順にする - Pebble Coding&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-23 21:36:13</published>
  <title>C++20でstd::vectorを範囲forを逆順にする</title>
  <type>rich</type>
  <url>https://pebble8888.hatenablog.com/entry/2024/03/23/213613</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
