ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::memory::lifetime_n 命名空间参考

struct  base_construct_t
 
struct  construct_t
 
struct  copy_assign_t
 
struct  copy_construct_t
 
struct  copy_t
 
struct  destruct_t
 
struct  move_assign_t
 
struct  move_construct_t
 
struct  move_t
 
struct  re_construct_t
 

概念

concept  construct_able
 
concept  construct_nothrow
 
concept  construct_trivial
 
concept  destruct_able
 
concept  destruct_nothrow
 
concept  destruct_trivial
 
concept  copy_construct_able
 
concept  copy_construct_nothrow
 
concept  copy_construct_trivial
 
concept  move_construct_able
 
concept  move_construct_nothrow
 
concept  move_construct_trivial
 
concept  copy_assign_able
 
concept  copy_assign_nothrow
 
concept  copy_assign_trivial
 
concept  move_assign_able
 
concept  move_assign_nothrow
 
concept  move_assign_trivial
 

函数

template<class T >
requires ::std::is_trivially_copyable_v< T > T * super_speed_trivial_copy_from_one (T *to, const T &value, size_t size) noexcept
 
template<class T >
requires ::std::is_trivially_copyable_v< T > T * super_speed_trivial_copy_from_one (T *to, const T &value) noexcept
 

变量

template<typename T >
constexpr construct_t< T > construct {}
 
constexpr struct elc::defs::memory::lifetime_n::destruct_t destruct
 
constexpr struct elc::defs::memory::lifetime_n::re_construct_t re_construct
 
constexpr struct elc::defs::memory::lifetime_n::copy_construct_t copy_construct
 
constexpr struct elc::defs::memory::lifetime_n::move_construct_t move_construct
 
constexpr struct elc::defs::memory::lifetime_n::move_t move
 
constexpr struct elc::defs::memory::lifetime_n::copy_t copy
 
constexpr struct elc::defs::memory::lifetime_n::copy_assign_t copy_assign
 
constexpr struct elc::defs::memory::lifetime_n::move_assign_t move_assign
 

函数说明

◆ super_speed_trivial_copy_from_one() [1/2]

template<class T >
requires ::std::is_trivially_copyable_v< T > T * elc::defs::memory::lifetime_n::super_speed_trivial_copy_from_one ( T *  to,
const T &  value 
)
inlinenoexcept

在文件 all_defs.cpp9548 行定义.

9548 {
9549 if constexpr(sizeof(T)>=sizeof(::std::max_align_t))
9550 if(is_all_byte_zero(value))
9551 ::std::memset(to,zero,sizeof(T));
9552 else
9553 *to=value;
9554 else
9555 *to=value;
9556 return to;
9557 }
constexpr bool is_all_byte_zero(T &&a) noexcept
函数调用图:

◆ super_speed_trivial_copy_from_one() [2/2]

template<class T >
requires ::std::is_trivially_copyable_v< T > T * elc::defs::memory::lifetime_n::super_speed_trivial_copy_from_one ( T *  to,
const T &  value,
size_t  size 
)
inlinenoexcept

在文件 all_defs.cpp9535 行定义.

9535 {
9536 if constexpr(sizeof(T)==sizeof(unsigned char))
9537 ::std::memset((unsigned char*)to,(unsigned char)value,size);
9538 elseif constexpr(sizeof(T)==sizeof(wchar_t))
9539 ::std::wmemset((wchar_t*)to,(wchar_t)value,size);
9540 else
9541 if(is_all_byte_zero(value))
9542 ::std::memset(to,zero,size*sizeof(T));
9543 else
9544 ::std::fill_n(to,size,value);
9545 return to;
9546 }
#define elseif
Definition all_defs.cpp:650
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ construct

template<typename T >
constexpr construct_t<T> elc::defs::memory::lifetime_n::construct {}
constexpr

constexpr变量模板,用于构造实例 用法: construct<类型>.able<构造参数类型> -> bool construct<类型>.nothrow<构造参数类型> -> bool construct<T>(参数) -> T (以参数构建T类型实例)

construct<T>[T*ptr](参数) -> T* (以参数在ptr地址处构建T类型实例,返回ptr) construct<T>[T*ptr][size_t size](参数) -> T* (以参数在ptr地址处构建size个T类型实例,返回ptr)

在文件 all_defs.cpp9656 行定义.

9656{};

◆ copy

constexpr struct elc::defs::memory::lifetime_n::copy_t elc::defs::memory::lifetime_n::copy

◆ copy_assign

constexpr struct elc::defs::memory::lifetime_n::copy_assign_t elc::defs::memory::lifetime_n::copy_assign

◆ copy_construct

constexpr struct elc::defs::memory::lifetime_n::copy_construct_t elc::defs::memory::lifetime_n::copy_construct

◆ destruct

constexpr struct elc::defs::memory::lifetime_n::destruct_t elc::defs::memory::lifetime_n::destruct

◆ move

constexpr struct elc::defs::memory::lifetime_n::move_t elc::defs::memory::lifetime_n::move

◆ move_assign

constexpr struct elc::defs::memory::lifetime_n::move_assign_t elc::defs::memory::lifetime_n::move_assign

◆ move_construct

constexpr struct elc::defs::memory::lifetime_n::move_construct_t elc::defs::memory::lifetime_n::move_construct

◆ re_construct

constexpr struct elc::defs::memory::lifetime_n::re_construct_t elc::defs::memory::lifetime_n::re_construct