<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yumetodo_bg</author_name>
  <author_url>https://blog.hatena.ne.jp/yumetodo_bg/</author_url>
  <blog_title>yumetodoの旅とプログラミングとかの記録</blog_title>
  <blog_url>https://yumetodo.hateblo.jp/</blog_url>
  <categories>
    <anon>プログラミング(C/C++)</anon>
  </categories>
  <description>std::vectorのメンバ関数push_back/emplace_backなどを使っているときにlibstdc++の実装だとcapacityが倍づつ増えていくのですが、それがソースコードのどこに該当するか調べました。 C++ の string と vector の reserve() の挙動 - bkブログ 2009年のこの記事によれば その代わり、「指数的な成長ポリシー」は _M_insert_aux() の中で実装されています。 のこと。ただ、その後C++11やらC++14やらが来るうちに実装もちょっと変わって、_M_check_lenというのが担当するようになったようです。 // C…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyumetodo.hateblo.jp%2Fentry%2F2018%2F02%2F02%2F191521&quot; title=&quot;ものすごく雑にlibstdc++のvectorの実装でcapacity決めているところを追う - yumetodoの旅とプログラミングとかの記録&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>https://cdn.rawgit.com/yumetodo/5f158a85164bf8938fd4d9c9e229ea95/raw/352d5c789cc2a20bf3b2785ef81ec1b359ab4398/libstdc++_vector_tcc__M_check_len.svg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-02-02 19:15:21</published>
  <title>ものすごく雑にlibstdc++のvectorの実装でcapacity決めているところを追う</title>
  <type>rich</type>
  <url>https://yumetodo.hateblo.jp/entry/2018/02/02/191521</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
