以下宏在做什么?
#define DEFINE_VECTOR_MEMBER_DATA_S(T,c,n,s) T c ## :: ## n[s]
我在旧版代码中拥有它。它是由MSVC 2022编译的,但不是Clang。 我打算替换它,但是在它之前,我需要知道它做什么。
#define DEFINE_VECTOR_MEMBER_DATA_S(T,c,n,s) T c ## :: ## n[s]
I have it in the legacy code. It is compiled by MSVC 2022, but not with Clang.
I plan to replace it, but before it I need to know what does it do.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它定义了一个静态成员的向量。
类型
t
。类
C
。向量
n
的名称。向量
S
的大小。##
将2件粘合在一起,但无论如何都不需要。如果链接器说矢量丢失了,则只需添加:
t c :: n [s];
.cpp 文件,并相应地更换了零件。
It defines a vector which is a static member of a class.
Type
T
.Class
c
.Name of vector
n
.Size of vector
s
.##
pastes 2 pieces together, but isn't needed anyway.If the linker says it the vector's missing just add:
T c::n[s];
Into a
.cpp
file with the parts replaced accordingly.