<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>konishih</author_name>
  <author_url>https://blog.hatena.ne.jp/konishih/</author_url>
  <blog_title>予定は未定</blog_title>
  <blog_url>https://konishih.hateblo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>unique_ptr</anon>
    <anon>shared_ptr</anon>
    <anon>vector</anon>
  </categories>
  <description>前回はコピーすべきところでムーブすべきではないことがわかった。 コードはshared_ptrを用いることで、すべてがうまくいくようになる。 class C { public: shared_ptr&lt;int&gt; d; C() : d(new int(0)) {} C( const int n ) : d(new int(n)) {} // コピーコンストラクタ、オペレータ=は自動生成でok ~C() {} }; bool operator&lt;(const C&amp; lhs, const C&amp; rhs ) { return lhs.d.get() &lt; rhs.d.get(); } void test_co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkonishih.hateblo.jp%2Fentry%2F2017%2F03%2F20%2F131119&quot; title=&quot;vectorとunique_ptr その2 - 予定は未定&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>2017-03-20 13:11:19</published>
  <title>vectorとunique_ptr その2</title>
  <type>rich</type>
  <url>https://konishih.hateblo.jp/entry/2017/03/20/131119</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
