<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Ox8000ffff</author_name>
  <author_url>https://blog.hatena.ne.jp/Ox8000ffff/</author_url>
  <blog_title>yanaken@phper</blog_title>
  <blog_url>https://ox8000ffff.hatenadiary.org/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>STL</anon>
  </categories>
  <description>std::map 使用時に、 「挿入させたいキーが既に登録されているかチェックしたい」 ってことがよくある。 そんな時は insert の戻り値を使用する。 std::map&lt;int, char&gt; hige; hige.insert(1, 'a'); ... std::map&lt;int, char&gt;::_Pairib pib = hige.insert(1, 'b'); if (!pib.second) { // キーが重複している } [説明] _Pairib のデータ構造を覗いてみる。 // _Pairib = _Pair + i(terator) + b(ool) typedef pair…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fox8000ffff.hatenadiary.org%2Fentry%2F20100226%2F1267201765&quot; title=&quot;std::map - insert 時の無駄な find を防ぐ - yanaken@phper&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>2010-02-26 01:29:25</published>
  <title>std::map - insert 時の無駄な find を防ぐ</title>
  <type>rich</type>
  <url>https://ox8000ffff.hatenadiary.org/entry/20100226/1267201765</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
