<?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++の文字列リテラル／ヌル終端文字列に対して、配列参照型をとる関数テンプレートf(const char(&amp;)[N])とポインタ型をとる関数f(const char*)のオーバーロードは、プログラマの期待通りには振る舞わない。本記事の内容はStack Overflowで見つけた質問と回答に基づく。文字列リテラルはconst char配列型（→id:yohhoy:20150213）のため、配列参照型const char(&amp;)[N]でうけることで文字列長Nを定数時間 O(1)*1 で取得できる。リテラル以外のヌル終端文字列はポインタ型const char*で受ける必要があるが、文…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20171118%2Fp1&quot; title=&quot;文字列リテラルとヌル終端文字列とで関数オーバーロード - 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>2017-11-18 00:00:00</published>
  <title>文字列リテラルとヌル終端文字列とで関数オーバーロード</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20171118/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
