如何解决前向声明的类背后的目的是什么,而无需在 C++ 项目中的任何地方定义和使用它?
我正在探索著名的 OBS Studio 源代码。那是在
使用一个 git sub-module
https://github.com/obsproject/libdshowcapture
在文件 source/capture-filter.hpp 中有一个类的 forward declaration,该类没有在整个 repo 和整个 OBS-Studio repo 中定义和使用。
namespace DShow {
// some other declaration
// this class is nowhere defined and used
class CaptureSource;
//some other declaration and definitions
}
我仔细检查过,但没有找到 CaptureSource
类的任何定义或用法。如果我是对的,那么这种声明的目的是什么?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。