<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>teppodone</author_name>
  <author_url>https://blog.hatena.ne.jp/teppodone/</author_url>
  <blog_title>機械設計 万善簿📝</blog_title>
  <blog_url>https://teppodone.hateblo.jp/</blog_url>
  <categories>
  </categories>
  <description>結論 非staticメンバ関数内で宣言したstatic付きローカル変数は，クラス全体で1つの変数として扱われます（=static付きのメンバ変数と同じ挙動）。オブジェクトを複数生成してもstatic付きローカル変数はクラス全体で共有されてしまうから気をつけましょう。 …という話を，モデルケースを交えて以下つらつらと説明していきます。 あらすじ ところで僕は百合キャッキャ本が好きです。また女騎士のお話も好きです。Twitterを眺めてるとしばしばその手の神絵師さんの落書きが流れてきて，その度に僕の「百合センサー」と「女騎士センサー」が反応します。 という訳でここでは例として「『百合センサの反応し…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fteppodone.hateblo.jp%2Fentry%2Fcpp_local_static_val&quot; title=&quot;【C++】「非staticメンバ関数内のstatic付きローカル変数」でどハマりした話。 - 機械設計 万善簿📝&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-ak.f.st-hatena.com/images/fotolife/t/teppodone/20171214/20171214014933.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-10-22 19:00:00</published>
  <title>【C++】「非staticメンバ関数内のstatic付きローカル変数」でどハマりした話。</title>
  <type>rich</type>
  <url>https://teppodone.hateblo.jp/entry/cpp_local_static_val</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
