<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>faith_and_brave</author_name>
  <author_url>https://blog.hatena.ne.jp/faith_and_brave/</author_url>
  <blog_title>Faith and Brave - C++で遊ぼう</blog_title>
  <blog_url>https://faithandbrave.hateblo.jp/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>for文が for (初期化式; 条件式; 加算式)になっているのと同様に、if文とswitch文にも、条件式の前準備としての初期化式をif (初期化式; 条件式)のように書けるようになります。 // mapへの要素挿入 if (auto p = m.try_emplace(key, value); !p.second) { // 要素挿入に失敗 (すでにkeyが登録されている) } else { // 挿入した要素を使用して何か処理する process(p.first); } if (status_code c = open_file(); c != SUCCESS) { // 処理に失敗 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F2016%2F11%2F15%2F160217&quot; title=&quot;C++1z if文とswitch文の条件式と初期化を分離 - Faith and Brave - C++で遊ぼう&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>2016-11-15 16:02:17</published>
  <title>C++1z if文とswitch文の条件式と初期化を分離</title>
  <type>rich</type>
  <url>https://faithandbrave.hateblo.jp/entry/2016/11/15/160217</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
