<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yohhoy</author_name>
  <author_url>https://blog.hatena.ne.jp/yohhoy/</author_url>
  <blog_title>yohhoyの日記</blog_title>
  <blog_url>https://yohhoy.hatenadiary.jp/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>C++標準ライブラリの文字列型std::string*1 とリテラル0を用いた初期化に関するメモ。 2021-07-02追記：C++2b(C++23)に向けてP2166R1が採択され、nullptr_tを取るstd::string／std::string_viewコンストラクタはdelete宣言される。この仕様追加によって本記事にあるs1, s2, s3はいずれもコンパイルエラーとして検出される。 #include &lt;string&gt; std::string s1 = 0; // NG: 未定義動作 std::string s2(0); // NG: 未定義動作 std::string s3 =…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20140501%2Fp1&quot; title=&quot;std::stringとゼロ初期化 - yohhoyの日記&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>2014-05-01 00:00:00</published>
  <title>std::stringとゼロ初期化</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20140501/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
