diff options
| author | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-04-07 13:41:34 -0500 |
| commit | 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch) | |
| tree | f1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/gcc~13/compatibility_005falias.html | |
new repository
Diffstat (limited to 'devdocs/gcc~13/compatibility_005falias.html')
| -rw-r--r-- | devdocs/gcc~13/compatibility_005falias.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/devdocs/gcc~13/compatibility_005falias.html b/devdocs/gcc~13/compatibility_005falias.html new file mode 100644 index 00000000..aebd3e04 --- /dev/null +++ b/devdocs/gcc~13/compatibility_005falias.html @@ -0,0 +1,11 @@ +<div class="section-level-extent" id="compatibility_005falias"> <div class="nav-panel"> <p> Next: <a href="exceptions" accesskey="n" rel="next">Exceptions</a>, Previous: <a href="constant-string-objects" accesskey="p" rel="prev">Constant String Objects</a>, Up: <a href="objective-c" accesskey="u" rel="up">GNU Objective-C Features</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div> <h1 class="section" id="compatibility_005falias-1"><span>8.6 compatibility_alias<a class="copiable-link" href="#compatibility_005falias-1"> ¶</a></span></h1> <p>The keyword <code class="code">@compatibility_alias</code> allows you to define a class name as equivalent to another class name. For example: </p> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">@compatibility_alias WOApplication GSWApplication;</pre> +</div> <p>tells the compiler that each time it encounters <code class="code">WOApplication</code> as a class name, it should replace it with <code class="code">GSWApplication</code> (that is, <code class="code">WOApplication</code> is just an alias for <code class="code">GSWApplication</code>). </p> <p>There are some constraints on how this can be used— </p> <ul class="itemize mark-bullet"> <li> +<code class="code">WOApplication</code> (the alias) must not be an existing class; </li> +<li> +<code class="code">GSWApplication</code> (the real class) must be an existing class. </li> +</ul> </div><div class="_attribution"> + <p class="_attribution-p"> + © Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br> + <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/compatibility_005falias.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/compatibility_005falias.html</a> + </p> +</div> |
