![](/img/trans.png)
[英]How to forward declare a member function of a class to use in another class?
[英]How to declare a member of type tied to the member of another class?
class A
{
public:
int a;
}
class B
{
public:
????(A.a) a;
}
我希望 Ba 与 Aa 的类型相同decltype
不正确,并且我不想向 A 类添加typedef
。
像这样尝试decltype
:
class B
{
public:
decltype(A::a) a;
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.