ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check > 模板结构体 参考
类 elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check > 继承关系图:
[图例]
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check > 的协作图:
[图例]

Public 类型

typedef ptr_t< T, ref_type, do_replace_checkbase_t
 
typedef base_ptr_t< T, ref_type, do_replace_checkthis_t
 
typedef same_ref_p_t< T, ref_typesame_ref
 
typedef same_ptr_p_t< T > same_ptr
 
typedef same_ref_p_t< T, ref_typebase_t
 
- Public 类型 继承自 elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >
typedef ptr_t< T, ref_type, do_replace_checkthis_t
 
typedef same_ref_p_t< T, ref_typebase_t
 
typedef same_ref_p_t< T, ref_typesame_ref
 
typedef same_ptr_p_t< T > same_ptr
 

Public 成员函数

 base_ptr_t (base_ptr_t &a) noexcept
 
 base_ptr_t (base_ptr_t &&a) noexcept
 
T * operator-> () const noexcept(get_nothrow)
 
T & operator* () const noexcept(get_nothrow)
 
 operator bool () const noexcept(get_nothrow)
 
auto operator! () const noexcept(get_nothrow)
 
 operator T* () const noexcept(get_nothrow)
 
base_ptr_toperator= (T *a) &noexcept(reset_nothrow)
 
base_ptr_toperator= (const same_ptr &a) &noexcept(reset_nothrow &&get_nothrow)
 
base_ptr_toperator= (const base_ptr_t &a) &noexcept(reset_nothrow &&get_nothrow)
 
base_ptr_toperator= (same_ref &&a) &noexcept
 
base_ptr_toperator= (base_ptr_t &&a) &noexcept
 
base_ptr_toperator= (null_ptr_t) &noexcept(reset_nothrow)
 
base_ptr_toperator= (nullptr_t) &noexcept(reset_nothrow)
 
 operator bool () noexcept(get_nothrow)
 
 operator for_delete_t * () noexcept(get_nothrow)
 
template<typename... Args>
requires (invoke<T>.able<Args...>)
decltype(autooperator() (Args &&... rest) noexcept(invoke< T >.nothrow< Args... >)
 
void reset (T *a) const noexcept(reset_nothrow)
 
void reset (nullptr_t=nullptr) const noexcept(reset_nothrow)
 
T * get () const noexcept(get_nothrow)
 
void swap_with (same_ref_p_t &a) noexcept
 
- Public 成员函数 继承自 elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >
 ptr_t (T *a, special_init_t) noexcept
 
constexpr ptr_t (T *a) noexcept
 
 ptr_t (const same_ptr &a) noexcept
 
 ptr_t (const same_ref &a) noexcept
 
 ptr_t (const ptr_t &a) noexcept
 
 ptr_t (const ptr_t< remove_cv< T >, ref_type, do_replace_check > &a) noexcept
 
 ptr_t (ptr_t &&a) noexcept
 
constexpr ptr_t (nullptr_t=nullptr) noexcept
 
constexpr ptr_t (null_ptr_t) noexcept
 
 ~ptr_t () noexcept(cut_nothrow)
 
void reset (T *a) const noexcept(reset_nothrow)
 
void reset (nullptr_t=nullptr) const noexcept(reset_nothrow)
 
void replace_check () const noexcept(replace_check_nothrow)
 
void do_replace (T *p) noexcept(replace_check_nothrow &&reset_nothrow)
 
template<typename ref_type_ , bool do_replace_check_>
void do_replace (const ptr_t< T, ref_type_, do_replace_check_ > &p) noexcept(replace_check_nothrow &&reset_nothrow)
 
T * get () const noexcept(get_nothrow)
 
bool unique () const noexcept
 
constexpr conditional< do_replace_check &&type_info< T >. template has_attribute_helper< replace_able >(), unstable_hash_t, hash_thash () const noexcept(noexcept((elc::defs::hash(get()))))
 
auto operator== (const T *a) const noexcept(noexcept((pointer_equal(add_const((::std::declval< const this_t & >()).get()), a))))
 
auto operator== (nullptr_t) const noexcept(noexcept((operator==(null_ptr))))
 
auto operator== (null_ptr_t) const noexcept(noexcept((operator==((T *) null_ptr))))
 
template<typename ref_type_ , bool do_replace_check_>
auto operator== (const ptr_t< T, ref_type_, do_replace_check_ > &b) const noexcept(noexcept((pointer_equal((::std::declval< const this_t & >()).get(), b.get()))))
 
template<typename ref_type_ , bool do_replace_check_>
requires (type_info<remove_cv<T>>!=type_info<T>)
auto operator== (const ptr_t< const T, ref_type_, do_replace_check_ > &b) const noexcept(noexcept((pointer_equal((::std::declval< const this_t & >()).get(), b.get()))))
 
template<typename ref_type_ , bool do_replace_check_>
requires (type_info<remove_cv<T>>!=type_info<T>)
auto operator== (const ptr_t< remove_cv< T >, ref_type_, do_replace_check_ > &b) const noexcept(noexcept((pointer_equal((::std::declval< const this_t & >()).get(), add_const(b.get())))))
 
void add_ref () const noexcept
 
void cut_ref () const noexcept(noexcept((cut_ref(nullptr))))
 
void swap_with (same_ref_p_t &a) noexcept
 
- Public 成员函数 继承自 elc::defs::memory::ptr_n::same_ref_p_t< T, ref_type >
 same_ref_p_t (T *a) noexcept
 
 same_ref_p_t (const same_ptr_p_t< T > &a) noexcept
 
void swap_with (same_ref_p_t &a) noexcept
 
- Public 成员函数 继承自 elc::defs::memory::ptr_n::same_ptr_p_t< T >
 same_ptr_p_t (const same_ptr_p_t &) noexcept=default
 
T * get () const noexcept
 

Public 属性

T * _to
 
- Public 属性 继承自 elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >
T * _to
 

静态 Public 属性

static constexpr bool get_nothrow
 
static constexpr bool reset_nothrow
 
- 静态 Public 属性 继承自 elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >
static constexpr bool reset_nothrow =cut_nothrow
 
static constexpr bool replace_check_nothrow =(type_info<T>. template not_has_has_attribute_helper< replace_able >())||reset_nothrow
 
static constexpr bool get_nothrow =replace_check_nothrow
 
static constexpr bool cut_nothrow
 
- 静态 Public 属性 继承自 elc::defs::memory::ptr_n::same_ref_p_t< T, ref_type >
static constexpr bool cut_nothrow =noexcept((::std::declval< ref_type >()).cut_ref())
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >
static void add_ref (T *a) noexcept
 
static void cut_ref (T *a) noexcept(cut_nothrow)
 
- Protected 成员函数 继承自 elc::defs::memory::ptr_n::same_ref_p_t< T, ref_type >
void cut_ref () const noexcept(noexcept((cut_ref(nullptr))))
 
void add_ref () const noexcept
 
- Protected 成员函数 继承自 elc::defs::memory::ptr_n::same_ptr_p_t< T >
 same_ptr_p_t (T *a) noexcept
 
- 静态 Protected 成员函数 继承自 elc::defs::memory::ptr_n::same_ref_p_t< T, ref_type >
static void cut_ref (T *a) noexcept(cut_nothrow)
 
static void add_ref (T *a) noexcept
 
- Protected 属性 继承自 elc::defs::memory::ptr_n::same_ptr_p_t< T >
T * _to
 

详细描述

template<class T, typename ref_type, bool do_replace_check>
struct elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >

在文件 all_defs.cpp23024 行定义.

成员类型定义说明

◆ base_t [1/2]

◆ base_t [2/2]

在文件 all_defs.cpp22902 行定义.

◆ same_ptr

在文件 all_defs.cpp22904 行定义.

◆ same_ref

在文件 all_defs.cpp22903 行定义.

◆ this_t

构造及析构函数说明

◆ base_ptr_t() [1/2]

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::base_ptr_t ( base_ptr_t< T, ref_type, do_replace_check > &  a)
inlinenoexcept

在文件 all_defs.cpp23040 行定义.

23040:base_t(a){}
constexpr T down_cast(U a) noexcept
向下转型至
ptr_t< T, ref_type, do_replace_check > base_t

◆ base_ptr_t() [2/2]

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::base_ptr_t ( base_ptr_t< T, ref_type, do_replace_check > &&  a)
inlinenoexcept

在文件 all_defs.cpp23041 行定义.

23041:base_t(move(a)){}
constexpr struct elc::defs::memory::lifetime_n::move_t move

成员函数说明

◆ get()

template<class T , typename ref_type , bool do_replace_check>
T * elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >::get ( ) const
inlinenoexcept

在文件 all_defs.cpp22966 行定义.

22966 {
22967 replace_check();
22968 return base_t::get();
22969 }
void replace_check() const noexcept(replace_check_nothrow)
T * get() const noexcept(get_nothrow)

◆ operator bool() [1/2]

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator bool ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp23045 行定义.

23045{return bool(pointer_to_bool(get()));}
constexpr auto pointer_to_bool(T *a) noexcept
指针转bool的重载接口,允许类对此进行自定义 elc内部的指针转bool应当视情况使用默认配置或此重载接口
T * get() const noexcept(get_nothrow)
函数调用图:

◆ operator bool() [2/2]

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator bool ( )
inlineexplicitnoexcept

在文件 all_defs.cpp23072 行定义.

23072{return add_const(this)->operator bool();}
constexpr const T add_const(T a) noexcept
对值追加const
函数调用图:

◆ operator for_delete_t *()

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator for_delete_t * ( )
inlinenoexcept

在文件 all_defs.cpp23073 行定义.

23073{return for_delete(get());}

◆ operator T*()

template<class T , typename ref_type , bool do_replace_check>
elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator T* ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp23047 行定义.

23047{return get();}

◆ operator!()

template<class T , typename ref_type , bool do_replace_check>
auto elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator! ( ) const
inlinenoexcept

在文件 all_defs.cpp23046 行定义.

23046{return!pointer_to_bool(get());}
函数调用图:

◆ operator()()

template<class T , typename ref_type , bool do_replace_check>
template<typename... Args>
requires (invoke<T>.able<Args...>)
decltype(auto) elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator() ( Args &&...  rest)
inlinenoexcept

在文件 all_defs.cpp23076 行定义.

23076{return(operator*())(forward<Args>(rest)...);}

◆ operator*()

template<class T , typename ref_type , bool do_replace_check>
T & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator* ( ) const
inlinenoexcept

在文件 all_defs.cpp23044 行定义.

23044{return*get();}

◆ operator->()

template<class T , typename ref_type , bool do_replace_check>
T * elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator-> ( ) const
inlinenoexcept

在文件 all_defs.cpp23043 行定义.

23043{return get();}

◆ operator=() [1/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( base_ptr_t< T, ref_type, do_replace_check > &&  a) &
inlinenoexcept

在文件 all_defs.cpp23053 行定义.

23053{swap_with(a);return*this;}
void swap_with(same_ref_p_t &a) noexcept

◆ operator=() [2/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( const base_ptr_t< T, ref_type, do_replace_check > &  a) &
inlinenoexcept

在文件 all_defs.cpp23051 行定义.

23051{reset(a.get());return*this;}
void reset(T *a) const noexcept(reset_nothrow)

◆ operator=() [3/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( const same_ptr a) &
inlinenoexcept

在文件 all_defs.cpp23050 行定义.

23050{reset(a.get());return*this;}

◆ operator=() [4/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( null_ptr_t  ) &
inlinenoexcept

在文件 all_defs.cpp23054 行定义.

23054{return*this=(T*)null_ptr;}

◆ operator=() [5/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( nullptr_t  ) &
inlinenoexcept

在文件 all_defs.cpp23055 行定义.

23055{return*this=null_ptr;}
constexpr struct elc::defs::base::null_ptr_n::null_ptr_t null_ptr

◆ operator=() [6/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( same_ref &&  a) &
inlinenoexcept

在文件 all_defs.cpp23052 行定义.

23052{swap_with(a);return*this;}

◆ operator=() [7/7]

template<class T , typename ref_type , bool do_replace_check>
base_ptr_t & elc::defs::memory::ptr_n::base_ptr_t< T, ref_type, do_replace_check >::operator= ( T *  a) &
inlinenoexcept

在文件 all_defs.cpp23049 行定义.

23049{reset(a);return*this;}

◆ reset() [1/2]

template<class T , typename ref_type , bool do_replace_check>
void elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >::reset ( nullptr_t  = nullptr) const
inlinenoexcept

在文件 all_defs.cpp22947 行定义.

22947{reset(null_ptr);}

◆ reset() [2/2]

template<class T , typename ref_type , bool do_replace_check>
void elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >::reset ( T *  a) const
inlinenoexcept

在文件 all_defs.cpp22946 行定义.

22946{auto tmp=_to;add_ref(_to=a);cut_ref(tmp);}
void add_ref() const noexcept
void cut_ref() const noexcept(noexcept((cut_ref(nullptr))))

◆ swap_with()

template<class T , typename ref_type , bool do_replace_check>
void elc::defs::memory::ptr_n::same_ref_p_t< T, ref_type >::swap_with ( same_ref_p_t a)
inlinenoexcept

在文件 all_defs.cpp22882 行定义.

22882{swap(_to,a._to);}
void swap(same_ref_p_t< T, ref_type > &a, same_ref_p_t< T, ref_type > &b) noexcept

类成员变量说明

◆ _to

template<class T , typename ref_type , bool do_replace_check>
T* elc::defs::memory::ptr_n::same_ptr_p_t< T >::_to
mutable

在文件 all_defs.cpp22870 行定义.

◆ get_nothrow

template<class T , typename ref_type , bool do_replace_check>
constexpr bool elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >::get_nothrow
staticconstexpr

在文件 all_defs.cpp22965 行定义.

◆ reset_nothrow

template<class T , typename ref_type , bool do_replace_check>
constexpr bool elc::defs::memory::ptr_n::ptr_t< T, ref_type, do_replace_check >::reset_nothrow
staticconstexpr

在文件 all_defs.cpp22945 行定义.


该结构体的文档由以下文件生成: