<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rhysd</author_name>
  <author_url>https://blog.hatena.ne.jp/rhysd/</author_url>
  <blog_title>はやくプログラムになりたい</blog_title>
  <blog_url>https://rhysd.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>C++11 で，() でなく {} で初期化する統一初期化（Uniform initialization）が入った．普段はこれを使っているけれど，この間これで std::string でハマったのでメモ． std::string のコンストラクタの中には，char 型の値を一定回数繰り返すコンストラクタがある． basic_string( size_type count, CharT ch, const Allocator&amp; alloc = Allocator() ); これを使おうとして std::string{3, 'a'} などと書こうとすると，narrow conversion でコン…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frhysd.hatenablog.com%2Fentry%2F2014%2F03%2F29%2F232412&quot; title=&quot; Uniform initialization で困るパターン（std::string） - はやくプログラムになりたい&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-03-29 23:24:12</published>
  <title> Uniform initialization で困るパターン（std::string）</title>
  <type>rich</type>
  <url>https://rhysd.hatenablog.com/entry/2014/03/29/232412</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
