<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>wata_d</author_name>
  <author_url>https://blog.hatena.ne.jp/wata_d/</author_url>
  <blog_title>閑古鳥</blog_title>
  <blog_url>https://www.little-cuckoo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>programming</anon>
  </categories>
  <description>std::remove は実際には要素を削除しないよという話。 remove は第三引数と同じ値の要素をコンテナの末尾に移動して、残った要素の最後の反復子を返すだけなので、コンテナのサイズは変化しない。コンテナから本当に削除したければ erase を組み合わせて使う必要がある。 unique なんかもそうですね。 #include &lt;iostream&gt; #include &lt;algorithm&gt; #include &lt;vector&gt; using namespace std; struct print { void operator()(int n) { cout &lt;&lt; n &lt;&lt; endl; } }…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.little-cuckoo.jp%2Fentry%2F20060413%2F1144896084&quot; title=&quot;erase-remove idiom - 閑古鳥&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>2006-04-13 11:41:24</published>
  <title>erase-remove idiom</title>
  <type>rich</type>
  <url>https://www.little-cuckoo.jp/entry/20060413/1144896084</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
