<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potisan</author_name>
  <author_url>https://blog.hatena.ne.jp/potisan/</author_url>
  <blog_title>potisanのプログラミングメモ</blog_title>
  <blog_url>https://potisan-programming-memo.hatenablog.jp/</blog_url>
  <categories>
    <anon>C++</anon>
    <anon>Windows</anon>
  </categories>
  <description>C++によるWindows開発ではATLとSTLが使えます。ATLがメモリ管理クラス（CComPtrやCComHeapPtr）に&amp;演算子を実装して内部ポインタのポインタ取得を可能にしている一方、STLはスマートポインタ（unique_ptrやshared_ptr）に&amp;演算子を実装していません。STLの方が広く使われているのにどうしてだろうと不思議に思っていたのですが、shared_ptrもスマートポインタであることを思い出して納得しました。 STLのshared_ptrは複数のインスタンスが参照カウントを使ってメモリを共有します。これが&amp;演算子で内部ポインタのポインタを返す場合、あるインスタン…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotisan-programming-memo.hatenablog.jp%2Fentry%2F2020%2F10%2F27%2F203433&quot; title=&quot;C++ STLのスマートポインタが&amp;amp;演算子をオーバーロードしないのはshared_ptrのため？ - potisanのプログラミングメモ&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>2020-10-27 20:34:33</published>
  <title>C++ STLのスマートポインタが&amp;演算子をオーバーロードしないのはshared_ptrのため？</title>
  <type>rich</type>
  <url>https://potisan-programming-memo.hatenablog.jp/entry/2020/10/27/203433</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
