| xgboost | 
侵入式指针的实现。一个智能指针,指向一个嵌入了引用计数器的对象。底层对象必须实现一个友元函数IntrusivePtrRefCount(),该函数返回引用计数器(类型为IntrusivePtrCell)。侵入式指针比std::shared_ptr<>更快:std::shared_ptr<>为引用计数器进行了额外的内存分配,而侵入式指针则没有。更多...
#include <intrusive_ptr.h>

| 类 | |
| 结构 | 哈希 | 
| 公共类型 | |
| 使用 | element_type = T | 
| 公共成员函数 | |
| IntrusivePtr (T *p) | |
| 从原始指针构造一个IntrusivePtr。IntrusivePtr取得所有权。更多... | |
| IntrusivePtr () noexcept=default | |
| IntrusivePtr (IntrusivePtr const &that) | |
| IntrusivePtr (IntrusivePtr &&that) noexcept | |
| ~IntrusivePtr () | |
| IntrusivePtr< T > & | operator= (IntrusivePtr< T > const &that) | 
| IntrusivePtr< T > & | operator= (IntrusivePtr< T > &&that) noexcept | 
| void | reset () | 
| void | reset (element_type *that) | 
| element_type & | operator* () const noexcept | 
| element_type * | operator-> () const noexcept | 
| element_type * | get () const noexcept | 
| operator bool () const noexcept | |
| int32_t | use_count () noexcept | 
| void | swap (IntrusivePtr< T > &that) noexcept | 
| 保护属性 | |
| T * | ptr_ {nullptr} | 
侵入式指针的实现。一个智能指针,指向一个嵌入了引用计数器的对象。底层对象必须实现一个友元函数IntrusivePtrRefCount(),该函数返回引用计数器(类型为IntrusivePtrCell)。侵入式指针比std::shared_ptr<>更快:std::shared_ptr<>为引用计数器进行了额外的内存分配,而侵入式指针则没有。
| using xgboost::IntrusivePtr< T >::element_type = T | 
| 
 | 内联显式 | 
从原始指针构造一个IntrusivePtr。IntrusivePtr取得所有权。
| p | 指向对象的原始指针 | 
| 
 | defaultnoexcept | 
| 
 | inline | 
| 
 | inlinenoexcept | 
| 
 | inline | 
| 
 | inlinenoexcept | 
| 
 | inlineexplicitnoexcept | 
| 
 | inlinenoexcept | 
| 
 | inlinenoexcept | 
| 
 | inlinenoexcept | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inlinenoexcept | 
| 
 | inlinenoexcept | 
| 
 | protected |