以下宏在做什么?

发布于 2025-01-21 22:38:38 字数 159 浏览 1 评论 0原文

#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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£冰雨忧蓝° 2025-01-28 22:38:38

它定义了一个静态成员的向量。

类型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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文