8.6. compatibility_alias

8.6 compatibility_alias

The keyword @compatibility_alias allows you to define a class name as equivalent to another class name. For example:

@compatibility_alias WOApplication GSWApplication;

tells the compiler that each time it encounters WOApplication as a class name, it should replace it with GSWApplication (that is, WOApplication is just an alias for GSWApplication).

There are some constraints on how this can be used—

  • WOApplication (the alias) must not be an existing class;
  • GSWApplication (the real class) must be an existing class.

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/compatibility_005falias.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部