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

struct  array_move_construct_t
 

Public 成员函数

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

静态 Public 成员函数

template<class T >
requires able<T>
static T * base_call (T *to, T *from) noexcept(nothrow< T >)
 
template<class T >
requires able<T>
static T * base_call (T *to, 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:copy_construct.able<T>
 
template<class T >
static constexpr bool nothrow
 
template<class T >
static constexpr bool trivial
 

详细描述

在文件 all_defs.cpp9883 行定义.

成员函数说明

◆ base_call() [1/2]

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

在文件 all_defs.cpp9898 行定义.

9898 {
9899 if constexpr(trivial<T>)
9900 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)));
9901 else{
9902 if constexpr(r_able<T>){
9903 construct<T>[to](::std::move(*from));
9904 return to;
9905 }else
9906 return copy_construct(to,from);
9907 }
9908 }
constexpr to_t< T > to(T v)
constexpr T down_cast(U a) noexcept
向下转型至
constexpr const T add_const(T a) noexcept
对值追加const
constexpr struct elc::defs::memory::lifetime_n::copy_construct_t copy_construct
函数调用图:

◆ base_call() [2/2]

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

在文件 all_defs.cpp9910 行定义.

9910 {
9911 if constexpr(type_info<T>.has_attribute(never_in_array))
9912 template_error("You cannot perform array operations on never_in_array type.");
9913 if constexpr(trivial<T>)
9914 return reinterpret_cast<T*>(::std::memcpy(to,add_const(from),sizeof(T)*size));
9915 else{
9916 if constexpr(r_able<T>){
9917 while(size--)
9918 construct<T>[to+size](::std::move(from[size]));
9919 return to;
9920 }else
9921 return copy_construct[size](to,from);
9922 }
9923 }
#define template_error(reason)
Definition all_defs.cpp:559
constexpr size_t size(::size_t v)
constexpr from_t< T > from(T v)
函数调用图:

◆ operator()() [1/3]

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

在文件 all_defs.cpp9934 行定义.

9935 {return base_call(to(),from());}
static T * base_call(T *to, T *from) noexcept(nothrow< T >)

◆ operator()() [2/3]

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

在文件 all_defs.cpp9930 行定义.

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

◆ operator()() [3/3]

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

在文件 all_defs.cpp9926 行定义.

9927 {return base_call(to,from);}

◆ operator[]()

constexpr array_move_construct_t elc::defs::memory::lifetime_n::move_construct_t::operator[] ( size_t  a) const
inlineconstexprnoexcept

在文件 all_defs.cpp9952 行定义.

9952{return{a};}

类成员变量说明

◆ able

template<class T >
constexpr bool elc::defs::memory::lifetime_n::move_construct_t::able =r_able<T>?true:copy_construct.able<T>
staticconstexpr

在文件 all_defs.cpp9889 行定义.

◆ nothrow

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

◆ r_able

template<class T >
constexpr bool elc::defs::memory::lifetime_n::move_construct_t::r_able
staticconstexpr

◆ trivial

template<class T >
constexpr bool elc::defs::memory::lifetime_n::move_construct_t::trivial
staticconstexpr

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