ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::memory::get_n::get_resize_t结构体 参考
elc::defs::memory::get_n::get_resize_t 的协作图:
[图例]

struct  insert_resize_t
 
struct  insert_t
 

Public 成员函数

template<typename T >
requires able<T>
void operator() (T *&arg, size_t to_size) const noexcept(nothrow< T >)
 
template<typename T >
requires able<T>
T * operator() (T *&&arg, size_t to_size) const noexcept(nothrow< T >)
 

静态 Public 成员函数

template<typename T >
requires able<T>
static void base_call (T *&arg, const size_t to_size) noexcept(nothrow< T >)
 

静态 Public 属性

template<typename T >
static constexpr bool able =construct<T>.able<>&&destruct.able<T>&&move.able<T>
 
template<typename T >
static constexpr bool nothrow =type_info<T>. template not_has_has_attribute_helper< abstract_base >()&&construct<T>.nothrow<>&&destruct.nothrow<T>&&move.nothrow<T>
 
static constexpr struct elc::defs::memory::get_n::get_resize_t::insert_t insert
 
static constexpr struct elc::defs::memory::get_n::get_resize_t::insert_resize_t insert_with_resize
 

详细描述

在文件 all_defs.cpp21803 行定义.

成员函数说明

◆ base_call()

template<typename T >
requires able<T>
static void elc::defs::memory::get_n::get_resize_t::base_call ( T *&  arg,
const size_t  to_size 
)
inlinestaticnoexcept

在文件 all_defs.cpp21810 行定义.

21810 {
21811 if constexpr(type_info<T>.has_attribute(never_in_array)){
21812 template_warning("For never_in_array type,get_resize will unget ptr when new_size=0 else do nothing.");
21813 if(to_size)
21814 return;
21815 unget(arg);
21816 arg=null_ptr;
21817 }elseif constexpr(type_info<T>.has_attribute(abstract_base)){
21818 arg=attribute_ptr_cast<abstract_base>(arg)->abstract_method_get_resize_this(to_size);
21819 }else{
21820 const size_t from_size=get_size_of_alloc(arg);
21821 if(from_size==to_size)
21822 return;
21826 }elseif(from_size){
21829 }else
21830 arg=get<T>[to_size]();
21831 }
21832 }
#define elseif
Definition all_defs.cpp:650
#define template_warning(reason)
Definition all_defs.cpp:563
constexpr struct elc::defs::base::null_ptr_n::null_ptr_t null_ptr
constexpr T down_cast(U a) noexcept
向下转型至
constexpr struct elc::defs::memory::alloc_n::get_size_of_alloc_t get_size_of_alloc
constexpr struct elc::defs::memory::get_n::unget_t unget
void alloc_size_cut(T *&arg, size_t to_size) noexcept
void alloc_size_grow(T *&arg, size_t to_size) noexcept(move.trivial< T > or move.nothrow< T >)
constexpr struct elc::defs::memory::lifetime_n::destruct_t destruct
函数调用图:

◆ operator()() [1/2]

template<typename T >
requires able<T>
T * elc::defs::memory::get_n::get_resize_t::operator() ( T *&&  arg,
size_t  to_size 
) const
inlinenoexcept

在文件 all_defs.cpp21840 行定义.

21840 {
21841 const APIs::alloc::source_location_guard slg;
21843 return arg;
21844 }
static void base_call(T *&arg, const size_t to_size) noexcept(nothrow< T >)

◆ operator()() [2/2]

template<typename T >
requires able<T>
void elc::defs::memory::get_n::get_resize_t::operator() ( T *&  arg,
size_t  to_size 
) const
inlinenoexcept

在文件 all_defs.cpp21835 行定义.

21835 {
21836 const APIs::alloc::source_location_guard slg;
21838 }

类成员变量说明

◆ able

template<typename T >
constexpr bool elc::defs::memory::get_n::get_resize_t::able =construct<T>.able<>&&destruct.able<T>&&move.able<T>
staticconstexpr

在文件 all_defs.cpp21805 行定义.

◆ insert

constexpr struct elc::defs::memory::get_n::get_resize_t::insert_t elc::defs::memory::get_n::get_resize_t::insert
static

◆ insert_with_resize

constexpr struct elc::defs::memory::get_n::get_resize_t::insert_resize_t elc::defs::memory::get_n::get_resize_t::insert_with_resize
static

◆ nothrow

template<typename T >
constexpr bool elc::defs::memory::get_n::get_resize_t::nothrow =type_info<T>. template not_has_has_attribute_helper< abstract_base >()&&construct<T>.nothrow<>&&destruct.nothrow<T>&&move.nothrow<T>
staticconstexpr

在文件 all_defs.cpp21807 行定义.


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