admin管理员组文章数量:1292183
When reading the implementation for std::shared_ptr
in llvm libc++, I find that some member functions of the __shared_weak_count
class are put in libcxx/src/memory.cpp
, instead of being put into the header file libcxx/include/__memory/shared_ptr.h
. For example,
// in libcxx/src/memory.cpp
__shared_weak_count::~__shared_weak_count();
void __shared_weak_count::__release_weak() noexcept;
// in libcxx/include/__memory/shared_ptr.h
__shared_weak_count::__shared_weak_count();
long __shared_weak_count::use_count();
My question is: why some definitions in the libc++ standard library implementation like __shared_weak_count::__release_weak
go into the dynamic library, while other class member functions of the same class do not?
本文标签:
版权声明:本文标题:libc++ - In C++ standard library implementation, why some definition is put into dynamic library like '__shared_weak_cou 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741551602a2384910.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论