<c- Copyright (c) 99-2025 by4he D Language Foundation All Rights Reserved. https:]ådlang.org/foundation_overview.html --> Conditional Compilation - D Programming Language<zËitle> <link rel="stylesheet" href="..ussuodemirror.css"> <link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/print.css" media="print"> <link rel="shortcut icon" href="..u‹avicon.ico"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0"> </head> <body id='Conditional Compilation' class='doc'> <script type="textv®avascript">document.body.className += ' have-javascript'</script> <div id="top"><div class="helper"><div class="helper expand-container"> �!�!div class="logo"><a href=".."><img id="logo" alt="D Logo" src="../imagesu(logo.svg"></a></div> �!�!a href="..wÛenu.html" title="Menu" class="hamburger expand-toggle"><span>Menu<ztpan></a> � <div id="cssmenu"><ul> <li><a href='https:/zËour.dlang.org'><span>Learn</span><tæ><vîi> �!�!li class='expand-container'><a class='expand-toggle' href='../documentation.html'><span>Documentation<ztpan></a> � <ul class='expand-content'> �!�!li><a href='..ztpec/spec.html'>Language Reference<tæ><vîi> �!�!li><a href='..y:hobos/index.html'>Library Reference<tæ><vîi> �!�!li><a href='..u(md.html'>Command-line Reference<tæ><vîi> �!�!li class="menu-divider"><a href='../comparison.html'>Feature Overview<tæ><vîi> �!�!li><a href='..tærticles.html'>Articles</a></li> �!�!zùl></li> <li><a href='../download.html'><span>Downloads</span><tæ><vîi> �!�!li><a href='https:]åcode.dlang.org'><span>Packages</span><tæ><vîi> �!�!li class='expand-container'><a class='expand-toggle' href='../community.html'><span>Community<ztpan></a> � <ul class='expand-content'> �!�!li><a href='https:]ådlang.org/blog'>Blog</a></li> <li><a href='../orgs-using-d.html'>Orgs using D<tæ><vîi> �!�!li><a href='https:]åtwitter.com/search?q=%�(y>�)dlang'>Twitter</a></li> <li class="menu-divider"><a href='https:]ådiscord.gguMZk9Q4'>Discord (community-run)<tæ><vîi> �!�!li><a href='https:]åforum.dlang.org'>Forums<tæ><vîi> �!�!li><a href='irc:]åirc.libera.chat/d'>IRC</a></li> <li><a href='https:/|øiki.dlang.org'>Wiki<tæ><vîi> �!�!li class="menu-divider"><a href='../bugstats.html'>Issues<tæ><vîi> �!�!li><a href='..uontributing.html'>Contributing</a></li> <li class="menu-divider"><a href='..u‹oundation/contributors.html'>Contributors<tæ><vîi> �!�!li><a href='..u‹oundation/index.html'>Foundation</a></li> <li><a href='../ztecurity.html'>Security Team<tæ><vîi> �!�!li class="menu-divider"><a href='https:/zttore.dlang.org[€>Store</a></li> <li><a href='../foundationu(onate.html'>Donate</a></li> <li><a href='../foundationztponsors.html'>Sponsors</a></li> �!�!zùl></li> <li class='expand-container'><a class='expand-toggle' href='..y¾esources.html'><span>Resources</span><tæ> <ul class='expand-content'> <li><a href='https:/zËour.dlang.org'>Tour<tæ><vîi> �!�!li><a href='https:]åwiki.dlang.orge‡ooks'>Books<tæ><vîi> �!�!li><a href='https:]åwiki.dlang.orgl4utorials'>Tutorials<tæ><vîi> �!�!li class="menu-divider"><a href='https:/|øiki.dlang.org/Development_tools'>Tools</a></li> <li><a href='https:/|øiki.dlang.org/Editors'>Editors</a></li> <li><a href='https:/|øiki.dlang.org/IDEs'>IDEs</a></li> <li><a href='https:/y¾un.dlang.io'>run.dlang.io<tæ><vîi> �!�!li><a href='http:/y¾ainers.github.io|sisuald|sisualdltartPage.html'>Visual D<tæ><vîi> �!�!li class="menu-divider"><a href='../acknowledgements.html'>Acknowledgments</a></li> <li><a href='../dstyle.html'>D Style</a></li> <li><a href='../specu’lossary.html'>Glossary</a></li> <li><a href='../sitemap.html'>Sitemap<tæ><vîi> </ul><vîi> <zùl></div> �!�!div class="search-container expand-container"> <a href="../search.html" class="expand-toggle"�4itle="Search"><span>Search</span><tæ> �!�!div id="search-box"> <form method="get" action="https:/u’oogle.com/search"> �!�!input type="hidden" id="domains" name="domains" value="dlang.org"> �!�!input type="hidden" id="sourceid" name="sourceid" value="google-search"> �!�!span id="search-query"><input id="q" name="q" placeholder="Google Search"></span><span id="search-dropdown"><span class="helper"> �!�!select id="sitesearch" name="sitesearch" size="1"> �!�!option�6alue="dlang.org">Entire Site</option> <option selected�6alue="dlang.org/spec">Language</option> <option �6alue="dlang.org/phobos">Library<wóption> �!�!option value="forum.dlang.org">Forums</option> �!�!ztelect> �!�!ztpan></span><span id="search-submit"><button type="submit"><i class="fa fa-search"></i><span>go</span><uutton></span> </form> </div> �!�!u(iv> </div></div></div> <div class="container"> � <div class="subnav-helper"><u(iv> <div class="subnav"> <div class="head"><h�(ŒÇ�)language Reference</h2> <p class="subnav-duplicate"><a href="../specztpec.html">table of contents<tæ><y:><u(iv> <ul> <li><a href=' ../specv}ntro.html'>Introduction<tæ><vîi><li><a href=' ../specvîex.html'>Lexical</a></li><li><a href=' ..ztpec/istring.html'>Interpolation Expression Sequence<tæ><vîi><li><a href=' ../specu’rammar.html'>Grammar</a></li><li><a href=' ..ztpec/module.html'>Modules</a></li><li><a href=' ..ztpec/declaration.html'>Declarations</a></li><li><a href=' ..ztpec/type.html'>Types</a></li><li><a href=' ..ztpec/property.html'>Properties<tæ><vîi><li><a href=' ../spectættribute.html'>Attributes<tæ><vîi><li><a href=' ../specy:ragma.html'>Pragmas<tæ><vîi><li><a href=' ../specu0xpression.html'>Expressions<tæ><vîi><li><a href=' ../speczttatement.html'>Statements<tæ><vîi><li><a href=' ../spectærrays.html'>Arrays</a></li><li><a href=' ..ztpec/hash-map.html'>Associative Arrays<tæ><vîi><li><a href=' ../speczttruct.html'>Structs and Unions</a></li><li><a href=' ..ztpec/class.html'>Classes<tæ><vîi><li><a href=' ../specv}nterface.html'>Interfaces<tæ><vîi><li><a href=' ../specu0num.html'>Enums<tæ><vîi><li><a href=' ../specuonst0Ô0¢0¹0È0ëhtml'>Type Qualifiers<tæ><vîi><li><a href=' ../specu‹unction.html'>Functions<tæ><vîi><li><a href=' ../specwóperatoroverloading.html'>Operator Overloading<tæ><vîi><li><a href=' ../speczËemplate.html'>Templates<tæ><vîi><li><a href=' ../speczËemplate-mixin.html'>Template Mixins<tæ><vîi><li><a href=' ../specuontracts.html'>Contract Programming<tæ><vîi><li><a href=' ../spec|sersion.html'>Conditional Compilation</a></li><li><a href=' ..ztpec/traits.html'>Traits<tæ><vîi><li><a href=' ../specu0rrors.html'>Error Handling</a></li><li><a href=' ..ztpec/unittest.html'>Unit Tests<tæ><vîi><li><a href=' ../specu’arbage.html'>Garbage Collection<tæ><vîi><li><a href=' ../specu‹loat.html'>Floating Point<tæ><vîi><li><a href=' ../specv}asm.html'>D x86 Inline Assembler</a></li><li><a href=' ..ztpec/ddoc.html'>Embedded Documentation<tæ><vîi><li><a href=' ../specv}nterfaceToC.html'>Interfacing to C</a></li><li><a href=' ..ztpec/cpp_interface.html'>Interfacing to C++</a></li><li><a href=' ..ztpec/objc_interface.html'>Interfacing�4o Objective-C<tæ><vîi><li><a href=' ../specy:ortability.html'>Portability�?�?uide</a></li><li><a href=' ..ztpec/entity.html'>Named Character Entities<tæ><vîi><li><a href=' ../specwÛemory-safe-d.html'>Memory Safety</a></li><li><a href=' ..ztpec/abi.html'>Application Binary�!�?nterface</a></li><li><a href=' ..ztpec/simd.html'>Vector Extensions</a></li><li><a href=' ..ztpec/betterc.html'>Better C</a></li><li><a href=' ..ztpec/importc.html'>ImportC<tæ><vîi><li><a href=' ../specwób.html'>Live Functions</a></li><li><a href=' ..ztpec/windows.html'>Windows Programming<tæ><vîi><li><a href=' ../specu’lossary.html'>Glossary</a></li><li><a href=' ..ztpec/legacy.html'>Legacy Code �!�!tæ><vîi> �!�!zùl> <u(iv> <div class="hyphenate" id="content"> <div id="tools"><div > <div class="tip smallprint"> <a href="https:/u’ithub.com/dlang/dlang.org/issueswâew?title=%5BConditional Compilation%5D%20&label=Severity:Enhancement">Report a bug</a> <div > If�9ou spot a problem with�4his page, click here�4o create a Bugzilla issue. <u(iv> <u(iv> <div class="tip smallprint"> <a href="https:]ågithub.comu(langu(lang.orgu0dit/masterztpec/version.dd">Improve this�0age<tæ> <div�  Quickly fork, edit online, and submit a�0ull request for this�0age. Requires a signed-in�?�?itHub account. This works well for small changes. If you'd like�4o make larger changes you may want�4o consider�5sing a local clone. <u(iv> <u(iv> </div></div> �!�!h1>Conditional Compilation</h1> <style> body" counter-reset: h1 25; counter-increment: h1 -±�( h1 { counter-reset: h�(N��)h3�0; } h2" counter-reset: h3 h4 p;�( h0µ0ó0Á0ü0à{ counter-reset: h4 p;�( h4 { counter-reset:�0; } h1::before" counter-increment: h1; content: counter(h1) ". "; �( .hyphenate h2::before" counter-increment: h2; content: counter(h1) "." counter(h�(SA�) " "; } h3::before" counter-increment: h3; content: counter(h1) "." counter(h�(SA�) "." counter(h0Î0Ã0È " "; } h4::before" counter-increment: h4; content: counter(h1) "." counter(h�(SA�) "." counter(h0Î0Ã0È "." counter(h4) " "; } p::before, .spec-boxes::before" counter-increment: p; content: counter(p) ". "; �( h°:before, h�(T|�):before, h0Ú0ó0¹:before, h4::before,�0::before, .spec-boxes::before { color: #999; font-size: 80%; margin-right: 0.25em; �( <zttyle> <div class="blankline"><u(iv> <div class="blankline"><u(iv> <div class="blankline"><u(iv> <div class="page-contents quickindex"> <div class="page-contents-header"> <b>Contents<u> </div> �!�!ol> �!�!li><a href="#version">Version Condition<tæ><vîi> �!�!li><a href="#version-specification">Version Specification<tæ><ol> �!�!li><a href="#predefined-versions">Predefined Versions<tæ><vîi> �!�!wól></li> <li><a href="#debug">Debug Condition</a><ol> <li><a href="#DebugStatement">Debug Statement<tæ><vîi> �!�!wól></li> <li><a href="#debug_specification">Debug Specification</a></li> <li><a href="#staticif">Static�!�?f Condition<tæ><vîi> �!�!li><a href="#staticforeach">Static Foreach</a><ol> <li><a href="#break-continue"><span class="d_inlinecode donthyphenate notranslate">break</span> and <span class="d_inlinecode donthyphenate notranslate">continue<ztpan></a></li> </ol><vîi> �!�!li><a href="#static-assert">Static Assert<tæ><vîi> <wól> <u(iv> <div class="blankline"><u(iv> <p><i>Conditional compilation<v}> is�4he�0rocess of selecting which code�4o compile and which code�4o not compile. �!�!y:> <div class="blankline"><u(iv> <pre class="bnf notranslate"><a id="ConditionalDeclaration"><span class="gname">ConditionalDeclaration</span><tæ>: �!�!a href="#Condition"><i>Condition</i></a>�!�!a href="..ztpec/attribute.html#DeclarationBlock"><i>DeclarationBlock</i></a> �!�!a href="#Condition"><i>Condition</i></a>�!�!a href="..ztpec/attribute.html#DeclarationBlock"><i>DeclarationBlock</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">else</span> <a href="../spectættribute.html#DeclarationBlock"><i>DeclarationBlock<v}><tæ> <a href="#Condition"><i>Condition<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">:</span> <a href="../specwÛodule.html#DeclDefs"><i>DeclDefs</i></a><sub>opt</sub> �!�!a href="#Condition"><i>Condition</i></a>�!�!a href="..ztpec/attribute.html#DeclarationBlock"><i>DeclarationBlock</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">else</span> <span class="d_inlinecode donthyphenate notranslate">:</span> <a href="../specwÛodule.html#DeclDefs"><i>DeclDefs</i></a><sub>opt</sub> <div class="blankline"></div> <a id="ConditionalStatement"><span class="gname">ConditionalStatement</span><tæ>: �!�!a href="#Condition"><i>Condition</i></a>�!�!a href="..ztpec/statement.html#NoScopeNonEmptyStatement"><i>NoScopeNonEmptyStatement</i></a> �!�!a href="#Condition"><i>Condition</i></a>�!�!a href="..ztpec/statement.html#NoScopeNonEmptyStatement"><i>NoScopeNonEmptyStatement</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">else</span> <a href="../speczttatement.html#NoScopeNonEmptyStatement"><i>NoScopeNonEmptyStatement<v}><tæ> </pre> <div class="blankline"></div> �!�!p>If�4he�!�!a href="#Condition"><i>Condition</i></a> is satisfied,�4hen the following <i>DeclarationBlock<v}> or�!�!i>Statement<v}> is compiled in. If it is not satisfied, the <i>DeclarationBlock<v}> or�!�!i>Statement<v}> after the optional�!�!span class="d_inlinecode donthyphenate notranslate">else</span> is compiled in. </p> <div class="blankline"></div> �!�!p>Any <i>DeclarationBlock<v}> or�!�!i>Statement<v}> that is not compiled in still must be syntactically correct. �!�!y:> <div class="blankline"><u(iv> <p>No new scope is introduced, even if�4he �!�!i>DeclarationBlock</i> or <i>Statement</i> is enclosed by <span class="d_inlinecode donthyphenate notranslate">{�(</span>. �!�!y:> <div class="blankline"><u(iv> <p><i>ConditionalDeclaration</i>s and <i>ConditionalStatement<v}>s can be nested. </p> <div class="blankline"></div> �!�!p>The <a href="#StaticAssert"><i>StaticAssert<v}><tæ> can be�5sed to issue errors at compilation�4ime for branches of the conditional compilation that are errors. �!�!y:> <div class="blankline"><u(iv> <p><i>Condition<v}> comes in�4he following forms: </p> <div class="blankline"></div> <pre class="bnf notranslate"><a id="Condition"><span class="gname">Condition<ztpan></a>: <a href="#VersionCondition"><i>VersionCondition<v}><tæ> <a href="#DebugCondition"><i>DebugCondition<v}><tæ> <a href="#StaticIfCondition"><i>StaticIfCondition<v}><tæ> </pre> <div class="blankline"></div> <h2><a class="anchor"�4itle="Permalink to�4his section" id="version" href="#version">Version Condition<tæ><vv�(ŒÇ�) <div class="blankline"></div> <pre class="bnf notranslate"><a id="VersionCondition"><span class="gname">VersionCondition<ztpan></a>: <span class="d_inlinecode donthyphenate notranslate">version (</span> <a href="../specvîex.html#Identifier"><i>Identifier<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">)</span> <span class="d_inlinecode donthyphenate notranslate">version (</span> <span class="d_inlinecode donthyphenate notranslate">unittest<ztpan>�!�!span class="d_inlinecode donthyphenate notranslate">)<ztpan> �!�!span class="d_inlinecode donthyphenate notranslate">version (<ztpan>�!�!span class="d_inlinecode donthyphenate notranslate">assert</span> <span class="d_inlinecode donthyphenate notranslate">)</span> </pre> <div class="blankline"></div> �!�!p>Versions enable multiple�6ersions of a module to be implemented with a single source file. �!�!y:> <div class="blankline"><u(iv> <p>The�!�!i>VersionCondition</i> is satisfied if�!�!i>Identifier</i> matches a�!�!i>version identifier</i>. </p> <div class="blankline"></div> �!�!p>The <i>version identifier<v}> can be set on the command line by the <span class="d_inlinecode donthyphenate notranslate">-version<ztpan> switch or in the module itself with a �!�!a href="#VersionSpecification"><i>VersionSpecification</i></a>, or�4hey can be�0redefined by�4he compiler. �!�!y:> <div class="blankline"><u(iv> <p>Version identifiers are in their own unique name space,�4hey do not conflict with debug identifiers or other symbols in�4he module. Version identifiers defined in one module have no influence over other imported modules. </p> <div class="blankline"></div> <pre class="d_code notranslate"><span class="d_keyword">int</span> k; <span class="d_keyword">version</span> (Demo)�!�!span class="d_comment">/Xëcompile in�4his code block for�4he demo version </span>{ �!�!span class="d_keyword">int</span> i; �!�!span class="d_keyword">int</span> k; <span class="d_comment">]å error, k already defined </span> i = 0Ú0ü0¸ } x = i; �!�!span class="d_comment">/Xëuses�4he i declared above </span><y:re> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">version<ztpan> (X86) { ...�!�!span class="d_comment">/Xëimplement custom inline assembler version </span>} <span class="d_keyword">else<ztpan> { ...�!�!span class="d_comment">/Xëuse default, but slow,�6ersion <ztpan>} </pre> <div class="blankline"></div> �!�!p>The <span class="d_inlinecode donthyphenate notranslate">version(unittest)</span> is satisfied if and only if the code is compiled�7ith unit�4ests enabled (the <a href="../dmd.html#switch-unittest"><em class="tt">-unittest</em><tæ> option on <em class="tt">dmd</em>). </p> <div class="blankline"></div> <div class="blankline"></div> <h2><span id="VersionSpecification"><a class="anchor"�4itle="Permalink to�4his section" id="version-specification" href="#version-specification">Version Specification<tæ><ztpan></h2> <div class="blankline"><u(iv> <pre class="bnf notranslate"><a id="VersionSpecification"><span class="gname">VersionSpecification</span><tæ>: �!�!span class="d_inlinecode donthyphenate notranslate">version =<ztpan>�!�!a href="..ztpec/lex.html#Identifier"><i>Identifier</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">;<ztpan> <y:re> <div class="blankline"><u(iv> <p>The�6ersion specification makes it straightforward to group a set of features�5nder one major�6ersion, for example: �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">version<ztpan> (ProfessionalEdition) { �!�!span class="d_keyword">version</span> = FeatureA; <span class="d_keyword">version<ztpan> = FeatureB; �!�!span class="d_keyword">version</span> = FeatureC; } <span class="d_keyword">version<ztpan> (HomeEdition) { �!�!span class="d_keyword">version</span> = FeatureA; } ... <span class="d_keyword">version<ztpan> (FeatureB) { ... implement Feature B ... } </pre> <div class="blankline"></div> �!�!p>Version identifiers or levels may not be forward referenced: �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">version<ztpan> (Foo) { �!�!span class="d_keyword">int</span> x; } <span class="d_keyword">version</span> = Foo; <span class="d_comment">]å error, Foo already used <ztpan></pre> �!�!p><i>VersionSpecification<v}>s may only appear at module scope.<y:> <div class="blankline"><u(iv> <p>While�4he debug and�6ersion conditions superficially behave�4he same, �4hey are intended for�6ery different purposes. Debug statements are for adding debug code�4hat is removed for�4he release�6ersion. Version statements are�4o aid in�0ortability and multiple release versions. </p> <div class="blankline"></div> �!�!p>Here's an example of a�!�!i>full</i>�6ersion as opposed to a�!�!i>demo</i>�6ersion:<y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">class<ztpan> Foo { �!�!span class="d_keyword">int</span> a, b; �!�!span class="d_keyword">version</span>(full) { <span class="d_keyword">int<ztpan> extrafunctionality() { ... <span class="d_keyword">return</span> ± <span class="d_comment">]å extra functionality is supported </span> �( �( �!�!span class="d_keyword">else<ztpan>�!�!span class="d_comment">/Xëdemo <ztpan> { <span class="d_keyword">int<ztpan> extrafunctionality() { <span class="d_keyword">return</span> 0; <span class="d_comment">]å extra functionality is not supported </span> �( �( } <y:re> <div class="blankline"><u(iv> <p>Various different�6ersion builds can be built�7ith a parameter to�6ersion: </p> <div class="blankline"></div> <pre class="d_code notranslate"> <span class="d_keyword">version<ztpan>(<b><i>identifier<v}><u>)�!�!span class="d_comment">/Xëadd in�6ersion code if�6ersion <ztpan> �!�!span class="d_comment">/Xëkeyword is identifier </span>{ ...�!�!span class="d_keyword">version</span> code ... } <y:re> <div class="blankline"><u(iv> <p>This is�0resumably set by�4he command line as �!�!span class="d_inlinecode donthyphenate notranslate">-version=identifier<ztpan>. </p> <div class="blankline"></div> <div class="blankline"></div> <h3><span id="PredefinedVersions"><a class="anchor"�4itle="Permalink to�4his section" id="predefined-versions" href="#predefined-versions">Predefined Versions<tæ><ztpan></h3> <div class="blankline"><u(iv> <p>Several environmental�6ersion identifiers and identifier name spaces are predefined for consistent usage. Version identifiers do not conflict �7ith other identifiers in�4he code,�4hey are in a separate name space. Predefined�6ersion identifiers are global, i.e. they apply�4o all modules being compiled and imported. �!�!y:> <div class="blankline"><u(iv> <center><table><caption>Predefined Version�!�?dentifiers</caption> <tr><th class="donthyphenate"><b>Version�!�?dentifier<u><zËh><th class="donthyphenate"><b>Description</b></th><zËr>�!�!div class="blankline"></div> �!�!tr><td><em>Host Compiler</em><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">DigitalMars</span> </td><td>DMD (Digital Mars D)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">GNU</span> </td><td>GDC (GNU D Compiler)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">LDC</span> </td><td>LDC (LLVM D Compiler)</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SDC<ztpan>�!�!zËd><td>SDC (Snazzy D Compiler)<zËd></tr> <div class="blankline"><u(iv> <tr><td><em>Target Operating System<u0m></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Windows<ztpan>�!�!zËd><td>Microsoft Windows systems Win3�(N��)and Win64<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Win0Õ0¡0é0Ã0É</span> </td><td>Microsoft 2 2�(g(�)bit Windows systems<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Win64</span> </td><td>Microsoft 5 54-bit Windows systems<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">linux</span> </td><td>All Linux systems</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Apple<ztpan>�!�!zËd><td>Apple systems OSX, iOS, TVOS, WatchOS and VisionOS</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">OSX<ztpan>�!�!zËd><td>macOS<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">iOS</span> </td><td>iOS</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">TVOS</span> </td><td>tvOS<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">WatchOS</span> </td><td>watchOS</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">VisionOS</span> </td><td>visionOS<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">FreeBSD</span> </td><td>FreeBSD</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">OpenBSD<ztpan>�!�!zËd><td>OpenBSD<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">NetBSD<ztpan>�!�!zËd><td>NetBSD</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">DragonFlyBSD</span> </td><td>DragonFlyBSD<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">BSD</span> </td><td>All other BSDs<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Solaris</span> </td><td>Solaris</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Posix<ztpan>�!�!zËd><td>All POSIX systems (includes Linux, FreeBSD, OS X, Solaris, etc.)</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">AIX<ztpan>�!�!zËd><td>IBM Advanced�!�?nteractive eXecutive OS<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Haiku</span> </td><td>The�?�!aiku operating system<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">SkyOS</span> </td><td>The SkyOS operating system<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">SysV3</span> </td><td>System V Release 0Ù0ü0¿zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">SysV4</span> </td><td>System V Release 4<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Hurd<ztpan>�!�!zËd><td>GNU Hurd</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Android<ztpan>�!�!zËd><td>The Android platform</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Emscripten</span> </td><td>The Emscripten platform</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">PlayStation<ztpan>�!�!zËd><td>The PlayStation platform</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">PlayStation4</span> </td><td>The PlayStation 2 2 2�0latform<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">FreeStanding<ztpan>�!�!zËd><td>An environment�7ithout an operating system (such as Bare-metal�4argets)<zËd></tr> <div class="blankline"><u(iv> <tr><td><em>Target Environment</em><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Cygwin<ztpan>�!�!zËd><td>The Cygwin environment</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MinGW<ztpan>�!�!zËd><td>The MinGW environment<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_Bionic</span> </td><td>Bionic C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_DigitalMars<ztpan>�!�!zËd><td>DigitalMars C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_Glibc<ztpan>�!�!zËd><td>Glibc C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_Microsoft<ztpan>�!�!zËd><td>Microsoft C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_Musl</span> </td><td>musl C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_Newlib</span> </td><td>newlib C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_UClibc</span> </td><td>uClibc C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CRuntime_WASI</span> </td><td>WASI C runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_Clang<ztpan>�!�!zËd><td>Deprecated, use <span class="d_inlinecode donthyphenate notranslate">CppRuntime_LLVM</span> instead<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_DigitalMars<ztpan>�!�!zËd><td>DigitalMars C++ runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_Gcc<ztpan>�!�!zËd><td>Deprecated, use <span class="d_inlinecode donthyphenate notranslate">CppRuntime_GNU<ztpan> instead</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_LLVM<ztpan>�!�!zËd><td>LLVM libc++ C++ runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_GNU<ztpan>�!�!zËd><td>GNU libstdc++ C++ runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_Microsoft<ztpan>�!�!zËd><td>Microsoft C++ runtime<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">CppRuntime_Sun<ztpan>�!�!zËd><td>Sun C++ runtime<zËd></tr> <div class="blankline"><u(iv> <tr><td><em>Target CPU and�!�?nstruction Set</em><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">X86</span> </td><td>Intel and AMD 2 2�(g(�)bit processors</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">X86_64</span> </td><td>Intel and AMD 5 54-bit processors</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">ARM<ztpan>�!�!zËd><td>The ARM architecture (0Õ0¡0é0Ã0É-bit) (AArch0Õ0¡0é0Ã0É et al)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">ARM_Thumb</span> </td><td>ARM in any Thumb mode</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">ARM_SoftFloat<ztpan>�!�!zËd><td>The ARM <span class="d_inlinecode donthyphenate notranslate">soft<ztpan> floating point ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">ARM_SoftFP<ztpan>�!�!zËd><td>The ARM <span class="d_inlinecode donthyphenate notranslate">softfp<ztpan> floating point ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">ARM_HardFloat</span> </td><td>The ARM�!�!span class="d_inlinecode donthyphenate notranslate">hardfp</span> floating�0oint ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">AArch64<ztpan>�!�!zËd><td>The Advanced RISC Machine architecture (64-bit)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">AsmJS</span> </td><td>The asm.js intermediate�0rogramming language<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">AVR</span> </td><td>8-bit Atmel AVR Microcontrollers<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Epiphany<ztpan>�!�!zËd><td>The Epiphany architecture<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">PPC</span> </td><td>The PowerPC architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">PPC_SoftFloat</span> </td><td>The PowerPC soft float ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">PPC_HardFloat</span> </td><td>The PowerPC hard float ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">PPC64</span> </td><td>The PowerPC architecture, 5 54-bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">IA64<ztpan>�!�!zËd><td>The Itanium architecture (64-bit)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS3�(vã�)ztpan>�!�!zËd><td>The MIPS architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS64<ztpan>�!�!zËd><td>The MIPS architecture, 5 54-bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_O3�(vã�)ztpan>�!�!zËd><td>The MIPS O0Õ0¡0é0Ã0É ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_N0Õ0¡0é0Ã0É</span> </td><td>The MIPS N3�(N��)ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_O64<ztpan>�!�!zËd><td>The MIPS O64 ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_N64</span> </td><td>The MIPS N64 ABI<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_EABI</span> </td><td>The MIPS EABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_SoftFloat</span> </td><td>The MIPS <span class="d_inlinecode donthyphenate notranslate">soft-float<ztpan> ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MIPS_HardFloat</span> </td><td>The MIPS <span class="d_inlinecode donthyphenate notranslate">hard-float<ztpan> ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">MSP40Ô0³</span> </td><td>The MSP430 architecture</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">NVPTX<ztpan>�!�!zËd><td>The Nvidia Parallel Thread Execution (PTX) architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">NVPTX64</span> </td><td>The Nvidia Parallel Thread Execution (PTX) architecture, 64-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">RISCV3�(vã�)ztpan>�!�!zËd><td>The RISC-V architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">RISCV64</span> </td><td>The RISC-V architecture, 64-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SPARC<ztpan>�!�!zËd><td>The SPARC architecture, 0Õ0¡0é0Ã0É-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SPARC_V8Plus</span> </td><td>The SPARC�68+ ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SPARC_SoftFloat<ztpan>�!�!zËd><td>The SPARC soft float ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SPARC_HardFloat<ztpan>�!�!zËd><td>The SPARC hard float ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SPARC64<ztpan>�!�!zËd><td>The SPARC architecture, 64-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">S390</span> </td><td>The System/0Ø0ë0Ä0 architecture, 0Õ0¡0é0Ã0É-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">SystemZ<ztpan>�!�!zËd><td>The System Z architecture, 5 54-bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">HPPA<ztpan>�!�!zËd><td>The HP PA-RISC architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">HPPA64<ztpan>�!�!zËd><td>The HP PA-RISC architecture, 5 54-bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">SH<ztpan>�!�!zËd><td>The SuperH architecture, 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">WebAssembly</span> </td><td>The 2 2 2 2ebAssembly�6irtual�!�?SA (instruction set architecture), 2 2�(g(�)bit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">WASI<ztpan>�!�!zËd><td>The WebAssembly System�!�?nterface</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Xtensa</span> </td><td>The Xtensa Architecture, 0Õ0¡0é0Ã0É-bit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Alpha<ztpan>�!�!zËd><td>The Alpha architecture</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Alpha_SoftFloat<ztpan>�!�!zËd><td>The Alpha soft float ABI</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Alpha_HardFloat<ztpan>�!�!zËd><td>The Alpha hard float ABI</td><zËr> <div class="blankline"></div> �!�!tr><td><em>Byte Order (endianess)<u0m></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">LittleEndian</span> </td><td>Byte order, least significant first</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">BigEndian<ztpan>�!�!zËd><td>Byte order, most significant first</td><zËr> <div class="blankline"></div> �!�!tr><td><em>Executable and Link Format<u0m></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">ELFv²ztpan>�!�!zËd><td>Elf version ²zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">ELFv2</span> </td><td>Elf�6ersion 2</td><zËr> <div class="blankline"></div> �!�!tr><td><em>Miscellaneous</em><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_BetterC</span> </td><td><a href="..ztpec/betterc.html">D as Better C<tæ> code (command line switch <a href="../dmd.html#switch-betterC"><em class="tt">-betterC</em><tæ>) is being generated<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_Exceptions<ztpan>�!�!zËd><td>Exception handling is supported. Evaluates to�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan>�7hen compiling with command line switch�!�!a href="..u(md.html#switch-betterC"><em class="tt">-betterC<u0m></a></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_ModuleInfo</span> </td><td><a href="..tæbi.html#ModuleInfo"><em class="tt">ModuleInfo<u0m></a> is supported. Evaluates to�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan>�7hen compiling with command line switch�!�!a href="..u(md.html#switch-betterC"><em class="tt">-betterC<u0m></a></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_TypeInfo</span> </td><td>Runtime�4ype information (a.k.a�!�!span class="d_inlinecode donthyphenate notranslate">TypeInfo</span>) is supported. Evaluates to�!�!span class="d_inlinecode donthyphenate notranslate">false<ztpan>�7hen compiling with command line switch�!�!a href="..u(md.html#switch-betterC"><em class="tt">-betterC<u0m></a></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_Coverage</span> </td><td><a href="..tærticles/code_coverage.html">Code coverage analysis</a> instrumentation (command line switch <a href="../dmd.html#switch-cov"><em class="tt">-cov</em><tæ>) is being generated<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_Ddoc<ztpan>�!�!zËd><td><a href="../specu(doc.html">Ddoc</a> documentation (command line switch <a href="../dmd.html#switch-D"><em class="tt">-D</em><tæ>) is being generated<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_InlineAsm_X86</span> </td><td><a href="..ztpec/iasm.html">Inline assembler<tæ> for X86 is implemented</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_InlineAsm_X86_64</span> </td><td><a href="..ztpec/iasm.html">Inline assembler<tæ> for X86-64 is implemented<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_LP64<ztpan>�!�!zËd><td><b>Pointers<u> are 64 bits (command line switch�!�!a href="..u(md.html#switch-m64"><em class="tt">-m64<u0m></a>). (Do not confuse�4his with C's LP64 model)</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_X3�(vã�)ztpan>�!�!zËd><td>Pointers are 2 2�(N��)bits, but words are still 64 bits (x0Õ0¡0é0Ã0É ABI) (This can be defined in parallel�4o <span class="d_inlinecode donthyphenate notranslate">X86_64<ztpan>)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_HardFloat</span> </td><td>The�4arget hardware has a floating-point unit</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_SoftFloat<ztpan>�!�!zËd><td>The target hardware does not have a floating-point�5nit<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_PIC</span> </td><td>Position Independent Code (command line switch <a href="../dmd-linux.html#switch-fPIC"><em class="tt">-fPIC</em><tæ>) is being generated<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_PIE</span> </td><td>Position Independent Executable (command line switch <a href="../dmd-linux.html#switch-fPIE"><em class="tt">-fPIE</em><tæ>) is being generated<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_SIMD<ztpan>�!�!zËd><td><a href="../specztimd.html">Vector extensions<tæ> (via�!�!span class="d_inlinecode donthyphenate notranslate">__simd</span>) are supported</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_AVX<ztpan>�!�!zËd><td>AVX Vector instructions are supported<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_AVX�(vã�)ztpan>�!�!zËd><td>AVX2 Vector instructions are supported</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_Version2</span> </td><td>This is a D�6ersion 2 compiler<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_NoBoundsChecks<ztpan>�!�!zËd><td>Array bounds checks are disabled (command line switch <a href="../dmd.html#switch-boundscheck"><em class="tt">-boundscheck=off</em><tæ>)</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_ObjectiveC</span> </td><td>The�4arget supports interfacing�7ith Objective-C<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_ProfileGC</span> </td><td>GC allocations being profiled (command line switch <a href="../dmd.html#switch-profile"><em class="tt">-profile=gc<u0m></a>)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_Optimized</span> </td><td>Compiling�7ith enabled optimizations (command line switch�!�!a href="..u(md.html#switch-O"><em class="tt">-O<u0m></a>)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">Core<ztpan>�!�!zËd><td>Defined when building the standard runtime</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Std<ztpan>�!�!zËd><td>Defined when building the standard library</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">unittest</span> </td><td><a href="..ztpec/unittest.html">Unit tests<tæ> are enabled (command line switch�!�!a href="..u(md.html#switch-unittest"><em class="tt">-unittest<u0m></a>)<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">assert<ztpan>�!�!zËd><td>Checks are being emitted for�!�!a href="..ztpec/expression.html#AssertExpression"><i>AssertExpression<v}><tæ>s</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_PreConditions<ztpan>�!�!zËd><td>Checks are being emitted for�!�!a href="..ztpec/function.html#contracts">in contracts<tæ><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">D_PostConditions<ztpan>�!�!zËd><td>Checks are being emitted for�!�!a href="..ztpec/function.html#contracts">out contracts</a></td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">D_Invariants</span> </td><td>Checks are being emitted for <a href="../speculass.html#invariants">class invariants</a> and�!�!a href="..ztpec/struct.html#Invariant">struct invariants</a></td><zËr> <div class="blankline"></div> �!�!tr><td><em>Special Cases</em><zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">none<ztpan>�!�!zËd><td>Never defined;�5sed to just disable a section of code<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">all</span> </td><td>Always defined;�5sed as�4he opposite of�!�!span class="d_inlinecode donthyphenate notranslate">none</span><zËd></tr> </table></center> <div class="blankline"><u(iv> <p>The following identifiers are defined, but are deprecated: </p> <div class="blankline"></div> �!�!center><table><caption>Predefined Version Identifiers (deprecated)</caption> <tr><th class="donthyphenate"><b>Version�!�?dentifier<u><zËh><th class="donthyphenate"><b>Description</b></th><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">darwin</span><zËd><td>The Darwin operating system;�5se�!�!span class="d_inlinecode donthyphenate notranslate">OSX<ztpan> instead</td><zËr> �!�!tr><td><span class="d_inlinecode donthyphenate notranslate">Thumb<ztpan></td><td>ARM in Thumb mode; use <span class="d_inlinecode donthyphenate notranslate">ARM_Thumb</span> instead<zËd></tr> <tr><td><span class="d_inlinecode donthyphenate notranslate">S0Ø0ë0Ä0X</span><zËd><td>The System^z90X architecture, 64-bit; use <span class="d_inlinecode donthyphenate notranslate">SystemZ</span> instead<zËd></tr> </table></center> <div class="blankline"><u(iv> <p>Others will be added as�4hey make sense and new implementations appear. �!�!y:> <div class="blankline"><u(iv> <p>To allow for future growth of�4he language, �4he�6ersion identifier namespace beginning with "D_" is reserved for identifiers indicating D language specification or new feature conformance. Further, all identifiers derived from the ones listed above by appending any character(s) are reserved. This means�4hat e.g.�!�!span class="d_inlinecode donthyphenate notranslate">ARM_foo<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">Windows_bar<ztpan> are reserved while <span class="d_inlinecode donthyphenate notranslate">foo_ARM</span> and <span class="d_inlinecode donthyphenate notranslate">bar_Windows</span> are not. �!�!y:> <div class="blankline"><u(iv> <p>Predefined version identifiers from�4his list cannot be set from the command line or from�6ersion statements. (This�0revents things like both�!�!span class="d_inlinecode donthyphenate notranslate">Windows<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">linux<ztpan> being simultaneously set.) </p> <div class="blankline"></div> �!�!p>Compiler�6endor specific�6ersions can be�0redefined if�4he �4rademarked�6endor identifier�0refixes it, as in: �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">version<ztpan>(DigitalMars_funky_extension) { ... } </pre> <div class="blankline"></div> �!�!p>It is important to�5se�4he right�6ersion identifier for the right purpose. For example, use the vendor identifier when�5sing a�6endor specific feature. Use the operating system identifier when�5sing an operating system specific feature, etc. </p> <div class="blankline"></div> <div class="blankline"></div> <h2><a class="anchor"�4itle="Permalink to�4his section" id="debug" href="#debug">Debug Condition<tæ><vv�(ŒÇ�) <div class="blankline"></div> <pre class="bnf notranslate"><a id="DebugCondition"><span class="gname">DebugCondition<ztpan></a>: <span class="d_inlinecode donthyphenate notranslate">debug</span> <span class="d_inlinecode donthyphenate notranslate">debug (</span> <a href="../specvîex.html#Identifier"><i>Identifier<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">)</span> </pre> <div class="blankline"></div> �!�!p>Two versions of programs are commonly built, a release build and a debug build. The debug build includes extra error checking code, test harnesses, pretty-printing code, etc. The debug statement conditionally compiles in its statement body. �!�?t is D's�7ay of what in C is done with�!�!span class="d_inlinecode donthyphenate notranslate">#ifdef DEBUG</span> Xë<span class="d_inlinecode donthyphenate notranslate">#endif<ztpan>�0airs. </p> <div class="blankline"></div> �!�!p>The <span class="d_inlinecode donthyphenate notranslate">debug</span> condition is satisfied�7hen the <span class="d_inlinecode donthyphenate notranslate">-debug<ztpan> switch is �0assed to�4he compiler. �!�!y:> <div class="blankline"><u(iv> <p>The�!�!span class="d_inlinecode donthyphenate notranslate">debug (<ztpan>�!�!i>Identifier</i>�!�!span class="d_inlinecode donthyphenate notranslate">)<ztpan> condition is satisfied when�4he debug identifier matches <i>Identifier<v}>. �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">class<ztpan> Foo { �!�!span class="d_keyword">int</span> a, b; <span class="d_keyword">debug<ztpan>: <span class="d_keyword">int<ztpan> flag; } <y:re> <div class="blankline"><u(iv> <h0Ü0ë0È<a class="anchor" title="Permalink�4o this section" id="DebugStatement" href="#DebugStatement">Debug Statement</a></h3> <div class="blankline"><u(iv> <p>A�!�!a href="#ConditionalStatement"><i>ConditionalStatement</i></a>�4hat has a <a href="#DebugCondition"><i>DebugCondition<v}><tæ> is called a <i>DebugStatement<v}>.�!�!i>DebugStatements<v}> have relaxed semantic checks in that �!�!span class="d_inlinecode donthyphenate notranslate">pure</span>,�!�!span class="d_inlinecode donthyphenate notranslate">@nogc<ztpan>, <span class="d_inlinecode donthyphenate notranslate">nothrow</span> and <span class="d_inlinecode donthyphenate notranslate">@safe</span> checks are not done. Neither do <i>DebugStatements</i> influence�4he inference of <span class="d_inlinecode donthyphenate notranslate">pure<ztpan>, <span class="d_inlinecode donthyphenate notranslate">@nogc</span>,�!�!span class="d_inlinecode donthyphenate notranslate">nothrow<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">@safe<ztpan> attributes.</p> <div class="blankline"></div> �!�!div class="spec-boxes undefined-behavior"><b>Undefined Behavior:</b> Since�4hese checks are bypassed, it is up�4o the programmer �4o ensure�4he code is correct. For example,�4hrowing an exception in a <span class="d_inlinecode donthyphenate notranslate">nothrow</span> function is undefined behavior. </div> <div class="blankline"></div> �!�!div class="spec-boxes best-practice"><b>Best Practices:<u> This enables�4he easy insertion of code to�0rovide debugging help, by bypassing the otherwise stringent attribute checks. Never ship release code that has�!�!i>DebugStatements<v}> enabled. �!�!u(iv> <div class="blankline"><u(iv> <h�(ŒÇ�)<a class="anchor" title="Permalink�4o this section" id="debug_specification" href="#debug_specification">Debug Specification</a></h2> <div class="blankline"><u(iv> <pre class="bnf notranslate"><a id="DebugSpecification"><span class="gname">DebugSpecification</span><tæ>: �!�!span class="d_inlinecode donthyphenate notranslate">debug =<ztpan>�!�!a href="..ztpec/lex.html#Identifier"><i>Identifier</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">;<ztpan> <y:re> <div class="blankline"><u(iv> <p>Debug identifiers are set either by�4he command line switch �!�!span class="d_inlinecode donthyphenate notranslate">-debug</span> or by a <i>DebugSpecification<v}>. �!�!y:> <div class="blankline"><u(iv> <p>Debug specifications only affect the module�4hey appear in,�4hey do not affect any imported modules. Debug identifiers are in�4heir own namespace, independent from�6ersion identifiers and other symbols. </p> <div class="blankline"></div> �!�!p>It is illegal to forward reference a debug specification: </p> <div class="blankline"></div> <pre class="d_code notranslate"><span class="d_keyword">debug</span>(foo)�7riteln(<span class="d_string">"Foo"<ztpan>); <span class="d_keyword">debug</span> = foo; <span class="d_comment">]å error, foo used before set </span><y:re> <div class="blankline"><u(iv> <p><i>DebugSpecification</i>s may only appear at module scope.</p> <div class="blankline"></div> �!�!p>Various different debug builds can be built with a�0arameter�4o debug: �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">debug<ztpan>(identifier)"�(�!�!span class="d_comment">/Xëadd in debug code if debug keyword is identifier <ztpan></pre> <div class="blankline"></div> �!�!p>These are presumably set by the command line as and <span class="d_inlinecode donthyphenate notranslate">-debug=</span><i>identifier</i>. </p> <div class="blankline"></div> <h2><a class="anchor"�4itle="Permalink to�4his section" id="staticif" href="#staticif">Static�!�?f Condition<tæ><vv�(ŒÇ�) <div class="blankline"></div> <pre class="bnf notranslate"><a id="StaticIfCondition"><span class="gname">StaticIfCondition<ztpan></a>: <span class="d_inlinecode donthyphenate notranslate">static if (</span> <a href="../specu0xpression.html#AssignExpression"><i>AssignExpression</i></a>�!�!span class="d_inlinecode donthyphenate notranslate">)<ztpan> <y:re> <div class="blankline"><u(iv> <p><a href="..ztpec/expression.html#AssignExpression"><i>AssignExpression<v}><tæ> is implicitly converted to a boolean�4ype, and is evaluated at compile�4ime. The condition is satisfied if it evaluates to�!�!span class="d_inlinecode donthyphenate notranslate">true</span>. �!�?t is not satisfied if it evaluates�4o <span class="d_inlinecode donthyphenate notranslate">false</span>. �!�!y:> <div class="blankline"><u(iv> <p>It is an error if�!�!a href="..ztpec/expression.html#AssignExpression"><i>AssignExpression<v}><tæ> cannot be implicitly converted �4o a boolean type or if it cannot be evaluated at compile�4ime. �!�!y:> <div class="blankline"><u(iv> <p><i>StaticIfCondition<v}>s can appear in module, class, template, struct, union, or function scope. In function scope,�4he symbols referred to in the <a href="../specu0xpression.html#AssignExpression"><i>AssignExpression</i></a> can be any that can normally be referenced by an expression at that�0oint. </p> <div class="blankline"></div> <pre class="d_code notranslate"><span class="d_keyword">const</span> <span class="d_keyword">int<ztpan> i = 2 2; <span class="d_keyword">int<ztpan> j = 2 2 2; <b><i><span class="d_keyword">static<ztpan>�!�!span class="d_keyword">if<ztpan></i></b> (i == 2 2) �!�!span class="d_comment">/Xëok, at module scope </span> �!�!span class="d_keyword">int</span> x; <span class="d_keyword">class<ztpan> C { �!�!span class="d_keyword">const</span> <span class="d_keyword">int<ztpan> k = 5; �!�!b><i><span class="d_keyword">static<ztpan>�!�!span class="d_keyword">if<ztpan></i></b> (i == 2 2) <span class="d_comment">]å ok </span> �!�!span class="d_keyword">int</span> x; �!�!span class="d_keyword">else<ztpan> �!�!span class="d_keyword">long<ztpan>�8; �!�!b><i><span class="d_keyword">static<ztpan>�!�!span class="d_keyword">if<ztpan></i></b> (j == 2 2) <span class="d_comment">]å error, j is not a constant </span> �!�!span class="d_keyword">int</span> y; <b><i><span class="d_keyword">static</span> <span class="d_keyword">if</span><v}><u> (k == 5)�!�!span class="d_comment">/Xëok, k is in current scope </span> �!�!span class="d_keyword">int</span> z; } <y:re> <div class="runnable-examples"> <pre class="d_code notranslate"><span class="d_keyword">template</span> Int(<span class="d_keyword">int<ztpan> i) { <span class="d_keyword">static</span> <span class="d_keyword">if</span> (i == 0Õ0¡0é0Ã0É) <span class="d_keyword">alias<ztpan>�!�?nt =�!�!span class="d_keyword">int</span>; �!�!span class="d_keyword">else<ztpan>�!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">if<ztpan> (i == 16) �!�!span class="d_keyword">alias</span> Int = <span class="d_keyword">short<ztpan>; <span class="d_keyword">else</span> <span class="d_keyword">static</span> <span class="d_keyword">assert</span>(0); <span class="d_comment">]å not supported <ztpan>} Int�Z0Õ0¡0é0Ã0É) a; <span class="d_comment">]å a is an int <ztpan>Int!(16) b; �!�!span class="d_comment">/Xëb is a short <ztpan>Int!(17) c; �!�!span class="d_comment">/Xëerror, static assert�4rips <ztpan></pre> </div> <div class="blankline"></div> �!�!p>A <i>StaticIfCondition</i> differs from an �!�!i>IfStatement<v}> in�4he following�7ays: �!�!y:> <div class="blankline"><u(iv> <ol> <li>It can be used�4o conditionally compile declarations, not just statements. �!�!vîi> �!�!li>It does not introduce a new scope even if�!�!span class="d_inlinecode donthyphenate notranslate">{ }<ztpan> are�5sed for conditionally compiled statements. �!�!vîi> �!�!li>For�5nsatisfied conditions,�4he conditionally compiled code need only be syntactically correct.�!�?t does not have to be semantically correct. </li> <li>It must be evaluatable at compile time. </li> </ol> <div class="blankline"><u(iv> <h�(ŒÇ�)<a class="anchor" title="Permalink�4o this section" id="staticforeach" href="#staticforeach">Static Foreach<tæ><vv�(ŒÇ�) <div class="blankline"></div> <pre class="bnf notranslate"><a id="StaticForeachDeclaration"><span class="gname">StaticForeachDeclaration<ztpan></a>: <a href="#StaticForeach"><i>StaticForeach<v}><tæ> <a href="../spectættribute.html#DeclarationBlock"><i>DeclarationBlock<v}><tæ> <a href="#StaticForeach"><i>StaticForeach<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">:</span> <a href="../specwÛodule.html#DeclDefs"><i>DeclDefs</i></a><sub>opt</sub> <div class="blankline"></div> <a id="StaticForeachStatement"><span class="gname">StaticForeachStatement</span><tæ>: �!�!a href="#StaticForeach"><i>StaticForeach</i></a>�!�!a href="..ztpec/statement.html#NoScopeNonEmptyStatement"><i>NoScopeNonEmptyStatement</i></a> <div class="blankline"></div> <a id="StaticForeach"><span class="gname">StaticForeach</span><tæ>: �!�!span class="d_inlinecode donthyphenate notranslate">static</span> <a href="../speczttatement.html#AggregateForeach"><i>AggregateForeach<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">static<ztpan>�!�!a href="..ztpec/statement.html#RangeForeach"><i>RangeForeach</i></a> <y:re> <div class="blankline"><u(iv> <p><span class="d_inlinecode donthyphenate notranslate">static foreach</span> expands its <em>DeclarationBlock</em> or�!�!em>DeclDefs<u0m> into a series of declarations, each of which may reference any <a href="../speczttatement.html#ForeachType"><i>ForeachType<v}><tæ> symbols declared.<y:> <ul><li>The aggregatey¾ange bounds are evaluated at compile�4ime and turned into a sequence of compile-time entities by evaluating corresponding code�7ith a <a href="../speczttatement.html#ForeachStatement"><i>ForeachStatement<v}><tæ>/<a href="../speczttatement.html#ForeachRangeStatement"><i>ForeachRangeStatement<v}><tæ> at compile�4ime.</li> <li>The body of the <span class="d_inlinecode donthyphenate notranslate">static foreach<ztpan> is then copied a number of times that corresponds�4o the number of elements of the sequence.<vîi> <li>Within the i-th copy,�4he name of�4he�!�!span class="d_inlinecode donthyphenate notranslate">static foreach</span> element 'variable' is bound to�4he i-th entry of�4he sequence, either as an <span class="d_inlinecode donthyphenate notranslate">enum<ztpan> �6ariable declaration (for constants) or an <span class="d_inlinecode donthyphenate notranslate">alias</span> declaration (for symbols). (In�0articular,�!�!span class="d_inlinecode donthyphenate notranslate">static foreach</span> variables are never runtime variables.) </li> </ul> <div class="runnable-examples" data-compile=''> <pre class="d_code notranslate"><span class="d_keyword">static</span> <span class="d_keyword">foreach<ztpan> (i; [0, 1, �(l4�) 2 2]) { �!�!span class="d_keyword">pragma<ztpan>(msg, i); } </pre> </div> <div class="blankline"></div> �!�!p><span class="d_inlinecode donthyphenate notranslate">static foreach<ztpan> supports multiple�!�!a href="..ztpec/statement.html#ForeachType"><i>ForeachType</i></a> �6ariables in cases where the corresponding <span class="d_inlinecode donthyphenate notranslate">foreach</span> statement supports�4hem. (In�4his case, <span class="d_inlinecode donthyphenate notranslate">static foreach<ztpan> generates a compile-time sequence of tuples, and the tuples are subsequently unpacked during iteration). </p> <div class="blankline"></div> <div class="runnable-examples" data-compile=''> <pre class="d_code notranslate"><span class="d_keyword">static<ztpan>�!�!span class="d_keyword">foreach</span> (i, v; ['a', 'b', 'c', 'd']) { �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(i + 'a' == v); } </pre> </div> <div class="blankline"></div> �!�!p>Like bodies of�!�!a href="#ConditionalDeclaration"><i>ConditionalDeclaration</i></a>s, a�!�!span class="d_inlinecode donthyphenate notranslate">static foreach</span> body does not introduce a new scope. Therefore, it can be used�4o add declarations�4o an existing scope: �!�!y:> <div class="blankline"><u(iv> <div class="runnable-examples" data-compile=''> <pre class="d_code notranslate"><span class="d_keyword">import</span> std.range : iota; <span class="d_keyword">static<ztpan>�!�!span class="d_keyword">foreach</span> (i; iota(0, 0Î0Ã0È) { <span class="d_keyword">mixin<ztpan>(<span class="d_string">`enum x`</span>, i, <span class="d_string">` = i;`</span>); } <span class="d_keyword">pragma<ztpan>(msg, x0, <span class="d_string">" "</span>,�81,<span class="d_string">" "</span>,�8�(SA�); <span class="d_comment">]å 0 1 2 <ztpan></pre> </div> <div class="blankline"></div> �!�!p>Inside a function, if a new scope is desired for each expansion, �5se another set of braces:<y:> <div class="blankline"><u(iv> <div class="runnable-examples" data-compile=''> <pre class="d_code notranslate"><span class="d_keyword">void</span> fun() { <span class="d_keyword">static</span> <span class="d_keyword">foreach<ztpan> (s; [<span class="d_string">"hi"<ztpan>, <span class="d_string">"hey"</span>,�!�!span class="d_string">"hello"<ztpan>]) "{ <span class="d_keyword">enum</span> len = s.length; �!�!span class="d_comment">/Xëlocal to each iteration </span> �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(len�.�.�.lt;= 5); �(} �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(!<span class="d_keyword">is</span>(<span class="d_keyword">typeof</span>(len))); } </pre> </div> <div class="blankline"></div> �!�!p><span class="d_inlinecode donthyphenate notranslate">static foreach<ztpan> supports sequence expansion �!�!a href="..ztpec/statement.html#foreach_over_tuples">like�!�!span class="d_inlinecode donthyphenate notranslate">foreach<ztpan></a>.<y:> <div class="blankline"><u(iv> <h0Ü0ë0È<a class="anchor" title="Permalink�4o this section" id="break-continue" href="#break-continue"><span class="d_inlinecode donthyphenate notranslate">break<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">continue</span><tæ><vv0Ü0ë0È <div class="blankline"></div> �!�!p>As�!�!span class="d_inlinecode donthyphenate notranslate">static foreach</span> is a code generation construct and not a loop,�!�!span class="d_inlinecode donthyphenate notranslate">break<ztpan> and�!�!span class="d_inlinecode donthyphenate notranslate">continue</span> cannot be used�4o change control flow within it.�!�?nstead of breaking or continuing a suitable enclosing statement, such an�5sage�9ields an error (this is to�0revent misunderstandings). �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">int<ztpan>�4est(<span class="d_keyword">int<ztpan>�8) { <span class="d_keyword">int<ztpan> r = -± �!�!span class="d_keyword">switch<ztpan>(x) { <span class="d_keyword">static</span> <span class="d_keyword">foreach<ztpan> (i; 0 .. 5) " �!�!span class="d_keyword">case<ztpan> i: r = i; �!�!span class="d_keyword">break</span>;�!�!span class="d_comment">/Xëerror </span> �( �!�!span class="d_keyword">default</span>:�!�!span class="d_keyword">break</span>; �( �!�!span class="d_keyword">return<ztpan> r; } <span class="d_keyword">static<ztpan>�!�!span class="d_keyword">foreach</span> (i; 0 .. 10) { �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(test(i) == (i�.�.�.lt; 5 ? i : -1)); } </pre> <div class="blankline"></div> �!�!p>An explicit <span class="d_inlinecode donthyphenate notranslate">break</span>/<span class="d_inlinecode donthyphenate notranslate">continue<ztpan> label can be used�4o avoid this limitation. (Note�4hat <span class="d_inlinecode donthyphenate notranslate">static foreach<ztpan> itself cannot be broken nor continued even if it is explicitly labeled.) </p> <div class="blankline"></div> <div class="runnable-examples" data-compile=''> <pre class="d_code notranslate"><span class="d_keyword">int</span> test(<span class="d_keyword">int</span> x) { �!�!span class="d_keyword">int</span> r = -1; Lswitch:�!�!span class="d_keyword">switch<ztpan>(x) { <span class="d_keyword">static</span> <span class="d_keyword">foreach<ztpan> (i; 0 .. 5) " �!�!span class="d_keyword">case<ztpan> i: r = i; �!�!span class="d_keyword">break</span> Lswitch; �( �!�!span class="d_keyword">default</span>:�!�!span class="d_keyword">break</span>; �( �!�!span class="d_keyword">return<ztpan> r; } <span class="d_keyword">static<ztpan>�!�!span class="d_keyword">foreach</span> (i; 0 .. 10) { �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(test(i) == (i�.�.�.lt; 5 ? i : -1)); } </pre> </div> <div class="blankline"></div> <div class="blankline"></div> <h2><span id="StaticAssert"><a class="anchor"�4itle="Permalink to�4his section" id="static-assert" href="#static-assert">Static Assert<tæ><ztpan></h2> <div class="blankline"><u(iv> <pre class="bnf notranslate"><a id="StaticAssert"><span class="gname">StaticAssert</span><tæ>: �!�!span class="d_inlinecode donthyphenate notranslate">static assert (<ztpan>�!�!a href="..ztpec/expression.html#ArgumentList"><i>ArgumentList<v}><tæ> <span class="d_inlinecode donthyphenate notranslate">)�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�s�i�g�n�"�> ;�<�/�s�p�a�n�>�<�s�p�a�n� �c�l�a�s�s�=�"�n�a�k�e�d�_�a�u�r�a�l�"�>�(lèŠ�)�<�/�s�p�a�n�></span> </pre> <div class="blankline"></div> �!�!p>The first <a href="../specu0xpression.html#AssignExpression"><i>AssignExpression</i></a> is evaluated at compile�4ime, and converted �4o a boolean value.�!�?f the value is�4rue,�4he static assert is ignored.�!�?f the value is false, an error diagnostic is issued and the compile fails. �!�!y:> <div class="blankline"><u(iv> <p>On failure, any subsequent <i>AssignExpression<v}>s�7ill each be converted to string and then concatenated. The resulting string will be printed out along with�4he error diagnostic. �!�!y:> <div class="blankline"><u(iv> <p>Unlike <a href="../specu0xpression.html#AssertExpression"><i>AssertExpression</i></a>s,�!�!i>StaticAssert</i>s are always checked and evaluated by the compiler�5nless they appear in an unsatisfied conditional. �!�!y:> <div class="blankline"><u(iv> <pre class="d_code notranslate"><span class="d_keyword">void</span> foo() { <span class="d_keyword">if</span> (0) { <span class="d_keyword">assert</span>(0); �!�!span class="d_comment">/Xënever trips </span> �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(0);�!�!span class="d_comment">/Xëalways�4rips <ztpan> } <span class="d_keyword">version<ztpan> (BAR) " �( �!�!span class="d_keyword">else<ztpan> " �!�!span class="d_keyword">static<ztpan>�!�!span class="d_keyword">assert<ztpan>(0);�!�!span class="d_comment">/Xëtrips when�6ersion BAR is not defined </span> �( } <y:re> <div class="blankline"><u(iv> <p><i>StaticAssert</i> is useful�4ool for drawing attention to conditional configurations not supported in�4he code. �!�!y:> <div class="blankline"><u(iv> <div style="float: left"><i class="fa fa-angle-left" aria-hidden="true"><v}> <a href="../specuontracts.html">Contract Programming<tæ><u(iv> <div style="float: right"><a href="../speczËraits.html">Traits</a>�!�!i class="fa fa-angle-right" aria-hidden="true"><v}><u(iv> <div style="clear:both"></div> <div class="smallprint" id="copyright">Copyright�.�.�.copy; 99-2025 by�4he�!�!a href="..u‹oundation_overview.html">D Language Foundation</a>�= Page generated by <a href="..ztpec/ddoc.html">Ddoc<tæ> on Fri Oct 10 �(g �):16:58 2025 �<u(iv> </div> <u(iv> �!�!script�4ype="text/javascript" src="https:/tæjax.googleapis.comtæjax/libsv®query/1.7.�(W�)jquery.min.js"><ztcript> �!�!script�4ype="text/javascript">window.jQuery || document.write('\x3Cscript src="../jsv®query-1.7.�(‘Ñ�)min.js">\x0Þ0¤0¯0íztcript>');<ztcript> �!�!script�4ype="text/javascript" src="../jsu(lang.js"><ztcript> � <script type="textv®avascript" src="..v®s/codemirror-compressed.js"></script> <script type="textv®avascript" src="..v®s/run.js"></script> <script type="textv®avascript" src="..v®s/listanchors.js"></script> <script type="textv®avascript">jQuery(document).ready(addVersionSelector);</script> <link rel="stylesheet" href="https:/wÛaxcdn.bootstrapcdn.comu‹ont-awesome/4.4.0/css/font-awesome.min.css"> <uody> <vvtml>�<�/�d�i�v�>�<�d�i�v� �c�l�a�s�s�=�"�n�a�k�e�d�_�c�t�r�l�"�>� �<�f�o�r�m� �a�c�t�i�o�n�=�"�/�i�n�d�e�x�.�c�g�i�/�l�a�r�g�e�r�-�t�e�x�t�"� �m�e�t�h�o�d�=�"�g�e�t�"� �n�a�m�e�=�"�g�a�t�e�"�>� �<�p�>�<�a� �h�r�e�f�=�"�h�t�t�p�:�/�/�a�l�t�s�t�y�l�e�.�a�l�f�a�s�a�d�o�.�n�e�t�"�>�A�l�t�S�t�y�l�e�<�/�a�>� 0k0ˆ0c0fY cÛ0U0Œ0_0Ú0ü0¸� �<�a� �h�r�e�f�=�"�h�t�t�p�s�:�/�/�d�l�a�n�g�.�o�r�g�/�s�p�e�c�/�v�e�r�s�i�o�n�.�h�t�m�l�"�>�(�-�&�g�t�;0ª0ê0¸0Ê0ë�)�<�/�a�>� �/� �<�l�a�b�e�l�>0¢0É0ì0¹�:� �<�i�n�p�u�t� �t�y�p�e�=�"�t�e�x�t�"� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�u�r�l�"� �v�a�l�u�e�=�"�h�t�t�p�s�:�/�/�d�l�a�n�g�.�o�r�g�/�s�p�e�c�/�v�e�r�s�i�o�n�.�h�t�m�l�"� �s�i�z�e�=�"�2�2�"� �/�>�<�/�l�a�b�e�l�>� �<�l�a�b�e�l�>0â0ü0É�:� �<�s�e�l�e�c�t� �n�a�m�e�=�"�n�a�k�e�d�_�p�o�s�t�_�m�o�d�e�"�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�d�e�f�a�u�l�t�"�>0Ç0Õ0©0ë0È�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�s�p�e�e�c�h�"�>—óXð0Ö0é0¦0¶�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�r�u�b�y�"�>0ë0ÓNØ0M�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�c�o�n�t�r�a�s�t�"�>‘M‚rSÍŽâ�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�l�a�r�g�e�r�-�t�e�x�t�"� �s�e�l�e�c�t�e�d�=�"�s�e�l�e�c�t�e�d�"�>e‡[WbáY'�<�/�o�p�t�i�o�n�>� �<�o�p�t�i�o�n� �v�a�l�u�e�=�"�m�o�b�i�l�e�"�>0â0Ð0¤0ë�<�/�o�p�t�i�o�n�>� �<�/�s�e�l�e�c�t�>� �<�i�n�p�u�t� �t�y�p�e�=�"�s�u�b�m�i�t�"� �v�a�l�u�e�=�"ˆhy:�"� �/�>� �<�/�p�>� �<�/�f�o�r�m�>� �<�/�d�i�v�>� � �