相关疑难解决方法(0)

预处理器宏扩展到另一个预处理器指令

最初我以为我需要这个,但我最终还是避开了它.然而,我的好奇心(以及对知识,嗡嗡声的兴趣)让我问:

可以是预处理器宏,例如

#include "MyClass.h"

INSTANTIATE_FOO_TEMPLATE_CLASS(MyClass)
Run Code Online (Sandbox Code Playgroud)

扩展到另一个包括,像在

#include "MyClass.h"

#include "FooTemplate.h"
template class FooTemplate<MyClass>;
Run Code Online (Sandbox Code Playgroud)

c++ macros expansion c-preprocessor preprocessor-directive

8
推荐指数
2
解决办法
8779
查看次数