为 class 的成员创建别名
Creating alias for a class's member
假设有一个 class test
和一个成员 void test::foo()
,我们知道我们可以通过 typedef test alt
为这个 class 创建一个别名(或者using
命令。)
C++ 是否支持以下意义上的别名 class 成员:typedef test::foo() alt::fooatl();
,即,alt.fooalt()
调用应对应于对 test.foo()
的调用?
没有。 p0945r0: "Generalizing alias declarations" 允许您这样做,但在最近的会议 (Rapperswil) 中尚未取得进展。
假设有一个 class test
和一个成员 void test::foo()
,我们知道我们可以通过 typedef test alt
为这个 class 创建一个别名(或者using
命令。)
C++ 是否支持以下意义上的别名 class 成员:typedef test::foo() alt::fooatl();
,即,alt.fooalt()
调用应对应于对 test.foo()
的调用?
没有。 p0945r0: "Generalizing alias declarations" 允许您这样做,但在最近的会议 (Rapperswil) 中尚未取得进展。