<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>osyo-manga</author_name>
  <author_url>https://blog.hatena.ne.jp/osyo-manga/</author_url>
  <blog_title>Secret Garden(Instrumental)</blog_title>
  <blog_url>https://secret-garden.hatenablog.com/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>例えば『int 型の可変長引数』みたいな感じで受け取るコードを考えてみた。 [std::initializer_list を使う] std::initializer_list&lt;int&gt; で受け取ります。 void print(std::initializer_list&lt;int&gt; xs){ for(auto&amp;&amp; x : xs){ std::cout &lt;&lt; x &lt;&lt; std::endl; } } print({1, 2, 3, 4, 5}); 関数の定義はすっきりするんですが、呼び出し側で {} をつける必要があるのがもにょる。 [可変長テンプレート引数を使う] 可変長テンプレート引数を使うを使い…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsecret-garden.hatenablog.com%2Fentry%2F2016%2F06%2F10%2F230548&quot; title=&quot;C++ で特定の型での可変長引数を受け取る - Secret Garden(Instrumental)&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-06-10 23:05:48</published>
  <title>C++ で特定の型での可変長引数を受け取る</title>
  <type>rich</type>
  <url>https://secret-garden.hatenablog.com/entry/2016/06/10/230548</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
