summaryrefslogtreecommitdiff
path: root/devdocs/c/error%2Fstatic_assert.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/error%2Fstatic_assert.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/error%2Fstatic_assert.html')
-rw-r--r--devdocs/c/error%2Fstatic_assert.html23
1 files changed, 0 insertions, 23 deletions
diff --git a/devdocs/c/error%2Fstatic_assert.html b/devdocs/c/error%2Fstatic_assert.html
deleted file mode 100644
index 59b96576..00000000
--- a/devdocs/c/error%2Fstatic_assert.html
+++ /dev/null
@@ -1,23 +0,0 @@
- <h1 id="firstHeading" class="firstHeading">static_assert</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;assert.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c11 t-until-c23"> <td> <pre data-language="c">#define static_assert _Static_assert</pre>
-</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c11">(since C11)</span> <br><span class="t-mark-rev t-until-c23">(removed in C23)</span> </td> </tr> </table> <p>This convenience macro expands to the keyword <a href="../keyword/_static_assert" title="c/keyword/ Static assert"><code>_Static_assert</code></a>.</p>
-<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include &lt;assert.h&gt;
-
-int main(void)
-{
- static_assert(2 + 2 == 4, "2+2 isn't 4"); // well-formed
-
- static_assert(sizeof(int) &lt; sizeof(char), // compile-time error
- "this program requires that int is less than char");
-}</pre></div> </div> <h3 id="Notes"> Notes</h3> <p>Since C23, <a href="../language/_static_assert" title="c/language/ Static assert"><code>static_assert</code></a> is itself a keyword, which may also be a predefined macro, so <a href="../error" title="c/error"><code>&lt;assert.h&gt;</code></a> no longer provides it.</p>
-<h3 id="References"> References</h3> <ul>
-<li> C17 standard (ISO/IEC 9899:2018): </li>
-<ul><li> 7.2/3 Diagnostics &lt;assert.h&gt; (p: 135) </li></ul>
-<li> C11 standard (ISO/IEC 9899:2011): </li>
-<ul><li> 7.2/3 Diagnostics &lt;assert.h&gt; (p: 186) </li></ul>
-</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/language/static_assert" title="cpp/language/static assert">C++ documentation</a></span> for <code>Static Assertion</code> </td>
-</tr> </table> <div class="_attribution">
- <p class="_attribution-p">
- &copy; cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br>
- <a href="https://en.cppreference.com/w/c/error/static_assert" class="_attribution-link">https://en.cppreference.com/w/c/error/static_assert</a>
- </p>
-</div>