<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>azaika</author_name>
  <author_url>https://blog.hatena.ne.jp/azaika/</author_url>
  <blog_title>進捗置き場というわけでもない場所</blog_title>
  <blog_url>https://azaika.hateblo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>Twitterでちょっと話してたsingletonクラスとfriendのどっちを使うか的な話の自分的まとめ。 どういう話 ユーザー(≠ソフトウェアエンドユーザー)に複数作らせたくないリソースを、singletonパターンで管理するのと、メンバをstatic、関数をfriendに分けるのどっちを使おうか的な話です。 というわけでとりあえず双方の適当なコードを書いてみる。 singleton class Singleton final { public: static int getA() { return a; } static void setA(int a_) { a = a_; } pri…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fazaika.hateblo.jp%2Fentry%2F2015%2F09%2F17%2F021317&quot; title=&quot;singletonとfriendのお話 - 進捗置き場というわけでもない場所&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>2015-09-17 02:13:17</published>
  <title>singletonとfriendのお話</title>
  <type>rich</type>
  <url>https://azaika.hateblo.jp/entry/2015/09/17/021317</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
