ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::memory::lifetime_n::copy_construct_t结构体 参考

struct  array_copy_construct_t
 

Public 成员函数

template<class T >
requires able<T>
T * operator() (T *to, const T *from) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (note::to_t< T * >to, note::from_t< const T * >from) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (note::from_t< const T * >from, note::to_t< T * >to) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (T *to, const T *from, size_t size) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (note::to_t< T * >to, note::from_t< const T * >from, size_t size) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (note::from_t< const T * >from, note::to_t< T * >to, size_t size) const noexcept(nothrow< T >)
 
template<class T >
requires able<T>
T * operator() (T *to, const T &from) const noexcept(nothrow< T >)
 
constexpr array_copy_construct_t operator[] (size_t a) const noexcept
 

静态 Public 成员函数

template<class T >
requires able<T>
static T * base_call (T *to, const T *from) noexcept(nothrow< T >)
 
template<class T >
requires able<T>
static T * base_call (T *to, const T *from, size_t size) noexcept(nothrow< T >)
 
template<class T >
requires able<T>
static T * base_call (T *to, const T &from) noexcept(nothrow< T >)
 
template<class T >
requires able<T>
static T * base_call (T *to, const T &from, size_t size) noexcept(nothrow< T >)
 

静态 Public 属性

template<class T >
static constexpr bool r_able
 
template<class T >
static constexpr bool able =r_able<T>?true:(construct<T>.able<>&&copy_assign_able<T>)
 
template<class T >
static constexpr bool nothrow
 
template<class T >
static constexpr bool trivial
 

详细描述

在文件 all_defs.cpp9769 行定义.

成员函数说明

◆ base_call() [1/4]

template<class T >
requires able<T>
static T * elc::defs::memory::lifetime_n::copy_construct_t::base_call ( T *  to,
const T &  from 
)
inlinestaticnoexcept

在文件 all_defs.cpp9835 行定义.

9835 {
9836 if constexpr(r_able<T>)
9837 construct<T>[to](from);
9838 else{
9839 construct<T>[to]();
9840 *to=from;
9841 }
9842 return to;
9843 }
constexpr to_t< T > to(T v)
constexpr from_t< T > from(T v)
constexpr T down_cast(U a) noexcept
向下转型至

◆ base_call() [2/4]

template<class T >
requires able<T>
static T * elc::defs::memory::lifetime_n::copy_construct_t::base_call ( T *  to,
const T &  from,
size_t  size 
)
inlinestaticnoexcept

在文件 all_defs.cpp9846 行定义.

9846 {
9847 if constexpr(type_info<T>.has_attribute(never_in_array))
9848 template_error("You cannot perform array operations on never_in_array type.");
9849 if constexpr(::std::is_trivially_copyable_v<T>)
9851 else
9852 while(size--)
9853 base_call(to+size,from);
9854 return to;
9855 }
#define template_error(reason)
Definition all_defs.cpp:559
requires ::std::is_trivially_copyable_v< T > T * super_speed_trivial_copy_from_one(T *to, const T &value, size_t size) noexcept
static T * base_call(T *to, const T *from) noexcept(nothrow< T >)
函数调用图:

◆ base_call() [3/4]

template<class T >
requires able<T>
static T * elc::defs::memory::lifetime_n::copy_construct_t::base_call ( T *  to,
const T *  from 
)
inlinestaticnoexcept

在文件 all_defs.cpp9784 行定义.

9784 {
9785 if constexpr(trivial<T>)
9786 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)));
9787 else{
9788 if constexpr(r_able<T>)
9789 new(to)T(*from);
9790 else{
9791 construct<T>[to]();
9792 *to=*from;
9793 }
9794 return to;
9795 }
9796 }
constexpr const T add_const(T a) noexcept
对值追加const
函数调用图:

◆ base_call() [4/4]

template<class T >
requires able<T>
static T * elc::defs::memory::lifetime_n::copy_construct_t::base_call ( T *  to,
const T *  from,
size_t  size 
)
inlinestaticnoexcept

在文件 all_defs.cpp9799 行定义.

9799 {
9800 if constexpr(trivial<T>)
9801 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)*size));
9802 else{
9803 while(size--)
9804 base_call(to+size,from+size);
9805 return to;
9806 }
9807 }
函数调用图:

◆ operator()() [1/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( note::from_t< const T * >  from,
note::to_t< T * >  to 
) const
inlinenoexcept

在文件 all_defs.cpp9818 行定义.

9819 {return base_call(to(),from());}

◆ operator()() [2/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( note::from_t< const T * >  from,
note::to_t< T * >  to,
size_t  size 
) const
inlinenoexcept

在文件 all_defs.cpp9831 行定义.

9832 {return base_call(to(),from(),size);}

◆ operator()() [3/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( note::to_t< T * >  to,
note::from_t< const T * >  from 
) const
inlinenoexcept

在文件 all_defs.cpp9814 行定义.

9815 {return base_call(to(),from());}

◆ operator()() [4/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( note::to_t< T * >  to,
note::from_t< const T * >  from,
size_t  size 
) const
inlinenoexcept

在文件 all_defs.cpp9827 行定义.

9828 {return base_call(to(),from(),size);}

◆ operator()() [5/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( T *  to,
const T &  from 
) const
inlinenoexcept

在文件 all_defs.cpp9858 行定义.

9859 {return base_call(to,from);}

◆ operator()() [6/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( T *  to,
const T *  from 
) const
inlinenoexcept

在文件 all_defs.cpp9810 行定义.

9811 {return base_call(to,from);}

◆ operator()() [7/7]

template<class T >
requires able<T>
T * elc::defs::memory::lifetime_n::copy_construct_t::operator() ( T *  to,
const T *  from,
size_t  size 
) const
inlinenoexcept

在文件 all_defs.cpp9823 行定义.

9824 {return base_call(to,from,size);}

◆ operator[]()

constexpr array_copy_construct_t elc::defs::memory::lifetime_n::copy_construct_t::operator[] ( size_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp9880 行定义.

9880{return{a};}

类成员变量说明

◆ able

template<class T >
constexpr bool elc::defs::memory::lifetime_n::copy_construct_t::able =r_able<T>?true:(construct<T>.able<>&&copy_assign_able<T>)
staticconstexpr

在文件 all_defs.cpp9775 行定义.

◆ nothrow

template<class T >
constexpr bool elc::defs::memory::lifetime_n::copy_construct_t::nothrow
staticconstexpr

◆ r_able

◆ trivial

template<class T >
constexpr bool elc::defs::memory::lifetime_n::copy_construct_t::trivial
staticconstexpr
初始值:

在文件 all_defs.cpp9780 行定义.


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