<?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++20 制約式(constraint-expression)でテンプレートパラメータに依存する定数条件式condを表現する場合、非定数式に起因するハードエラーを防ぐためstd::bool_constant&lt;cond&gt;::valueと記述する必要がある。 #include &lt;type_traits&gt; struct X { // X::valueは非定数式 static inline int value = 42; }; struct Y { // Y::valueは定数式 static constexpr inline int value = 42; }; struct Z {}; temp…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20210307%2Fp1&quot; title=&quot;制約式std::bool_constant&amp;lt;cond&amp;gt;::value - 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>2021-03-07 00:00:00</published>
  <title>制約式std::bool_constant&lt;cond&gt;::value</title>
  <type>rich</type>
  <url>https://yohhoy.hatenadiary.jp/entry/20210307/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
