ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct > 模板结构体 参考
类 elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct > 继承关系图:
[图例]
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct > 的协作图:
[图例]

Public 成员函数

void swap_with (this_t &a) noexcept
 
 base_function_t () noexcept=default
 
template<class T >
requires base_on_this_t_or_more_stringent_restrictions<T>
 base_function_t (const T &a) noexcept
 
 base_function_t (const this_t &a) noexcept
 
 base_function_t (this_t &&a) noexcept
 
 base_function_t (null_ptr_t) noexcept
 
 base_function_t (nullptr_t) noexcept
 
template<class T >
requires get_data_able<T>
 base_function_t (T &&a) noexcept(get_data_nothrow< T >)
 
 ~base_function_t () noexcept(promise_nothrow_at_destruct)=default
 
this_toperator= (const this_t &a) &noexcept(promise_nothrow_at_destruct)=default
 
this_toperator= (this_t &&a) &noexcept(promise_nothrow_at_destruct)=default
 
this_toperator= (null_ptr_t) &noexcept(promise_nothrow_at_destruct)
 
this_toperator= (nullptr_t) &noexcept(promise_nothrow_at_destruct)
 
template<class T >
requires base_on_this_t_or_more_stringent_restrictions<T>
this_toperator= (const T &a) &noexcept(promise_nothrow_at_destruct)
 
template<class T >
requires get_data_able<T>
this_toperator= (T &&a) noexcept(get_data_nothrow< T > &&promise_nothrow_at_destruct)
 
this_t deep_copy ()
 
 operator bool () const noexcept
 
Ret_t operator() (Args_t...args) const noexcept(nothrow)
 
 operator func_ptr_t () const noexcept(promise_nothrow_at_destruct)
 
- Public 成员函数 继承自 elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>
 function_data_saver_t () noexcept=default
 
 function_data_saver_t (const this_t &a) noexcept
 
 function_data_saver_t (this_t &&a) noexcept
 
bool operator== (const this_t &a) const
 
template<typename T >
requires (equal.able<base_t_w,T>)
bool operator== (T &&a) const noexcept(equal.nothrow< base_t_w, T >)
 
template<typename T >
bool was_an () const noexcept
 
template<typename T >
maybe_fail_reference< T > get_as () noexcept
 
void operator= (const this_t &a)
 
Ret_t call (Args_t &&...rest) const
 

Protected 类型

typedef function_data_saver_t< Ret_t(Args_t...)> base_t
 
typedef base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destructthis_t
 
template<class U >
using func_data_t = function_n::func_data_t< U, Ret_t(Args_t...)>
 
typedef Ret_t func_t(Args_t...) noexcept(nothrow)
 
typedef func_tfunc_ptr_t
 
typedef comn_ptr_t< base_t_wptr_t
 
- Protected 类型 继承自 elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>
typedef function_data_saver_t< Ret_t(Args_t...)> this_t
 
typedef base_func_data_t< Ret_t(Args_t...)> base_t_w
 
typedef comn_ptr_t< base_t_wptr_t
 

Protected 成员函数

 base_function_t (base_t::ptr_t a) noexcept
 
- Protected 成员函数 继承自 elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>
void swap_with (this_t &a) noexcept
 

静态 Protected 成员函数

template<class T >
static constexpr bool get_data_able_helper () noexcept
 
template<class T >
static constexpr bool get_data_nothrow_helper () noexcept
 
template<class T >
requires get_data_able<T>
static auto get_data_from (T &&a) noexcept(get_data_nothrow< T >)
 

Protected 属性

ptr_t _m
 
- Protected 属性 继承自 elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>
ptr_t _m
 

静态 Protected 属性

template<class T >
static constexpr bool base_on_this_t_or_more_stringent_restrictions
 
template<class T >
static constexpr bool get_data_able =get_data_able_helper<T>()
 
template<class T >
static constexpr bool get_data_nothrow =get_data_nothrow_helper<T>()
 

友元

template<class , bool >
class base_function_t
 

详细描述

template<class Ret_t, class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
struct elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >

在文件 all_defs.cpp24296 行定义.

成员类型定义说明

◆ base_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
typedef function_data_saver_t<Ret_t(Args_t...)> elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_t
protected

在文件 all_defs.cpp24298 行定义.

◆ func_data_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class U >
using elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::func_data_t = function_n::func_data_t<U,Ret_t(Args_t...)>
protected

在文件 all_defs.cpp24305 行定义.

◆ func_ptr_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
typedef func_t* elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::func_ptr_t
protected

在文件 all_defs.cpp24308 行定义.

◆ func_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
typedef Ret_t elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::func_t(Args_t...) noexcept(nothrow)
protectednoexcept

在文件 all_defs.cpp24307 行定义.

◆ ptr_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
typedef comn_ptr_t<base_t_w> elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>::ptr_t
protected

在文件 all_defs.cpp24238 行定义.

◆ this_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
typedef base_function_t<Ret_t(Args_t...)noexcept(nothrow),promise_nothrow_at_destruct> elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::this_t
protected

在文件 all_defs.cpp24299 行定义.

构造及析构函数说明

◆ base_function_t() [1/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( base_t::ptr_t  a)
inlineexplicitprotectednoexcept

◆ base_function_t() [2/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( )
defaultnoexcept

◆ base_function_t() [3/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( const T &  a)
inlinenoexcept

◆ base_function_t() [4/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( const this_t a)
inlinenoexcept

在文件 all_defs.cpp24378 行定义.

24378:base_t(a){}

◆ base_function_t() [5/8]

◆ base_function_t() [6/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( null_ptr_t  )
inlinenoexcept

在文件 all_defs.cpp24382 行定义.

24382:base_function_t(){}

◆ base_function_t() [7/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( nullptr_t  )
inlinenoexcept

在文件 all_defs.cpp24383 行定义.

24383:base_function_t(null_ptr){}

◆ base_function_t() [8/8]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
requires get_data_able<T>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_function_t ( T &&  a)
inlinenoexcept

在文件 all_defs.cpp24385 行定义.

◆ ~base_function_t()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::~base_function_t ( )
defaultnoexcept

成员函数说明

◆ deep_copy()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::deep_copy ( )
inline

在文件 all_defs.cpp24405 行定义.

24405{return this_t{copy_get(_m.get())};}
constexpr struct elc::defs::memory::get_n::copy_get_t copy_get
base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct > this_t

◆ get_data_able_helper()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
static constexpr bool elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::get_data_able_helper ( )
inlinestaticconstexprprotectednoexcept

在文件 all_defs.cpp24322 行定义.

24322 {
24324 return false;
24325 elseif constexpr(is_function_t<T>)
24326 return false;
24327 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24328 return get_data_able_helper<decltype(&declvalue(T))>();
24329 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24330 return get<func_data_t<remove_cvref<T>>>.able<T>;
24331 else
24332 return false;
24333 }
#define elseif
Definition all_defs.cpp:650
#define declvalue(...)
Definition all_defs.cpp:556

◆ get_data_from()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
requires get_data_able<T>
static auto elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::get_data_from ( T &&  a)
inlinestaticprotectednoexcept

在文件 all_defs.cpp24353 行定义.

24353 {
24354 if constexpr(::std::is_function_v<remove_cvref<T>>)
24355 return get_data_from(&a);
24356 elseif constexpr(is_function_t<T>)
24357 return a._m;
24358 else{
24359 //BLOCK:constexpr checks
24361 template_error("unexpected assign.");
24362 if constexpr(nothrow)
24364 template_warning("the call of T was not noexcept,this may cause terminate.");
24365 //BLOCK_END
24367 }
24368 }
#define template_error(reason)
Definition all_defs.cpp:559
#define template_warning(reason)
Definition all_defs.cpp:563
constexpr struct elc::defs::memory::lifetime_n::destruct_t destruct

◆ get_data_nothrow_helper()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
static constexpr bool elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::get_data_nothrow_helper ( )
inlinestaticconstexprprotectednoexcept

在文件 all_defs.cpp24337 行定义.

24337 {
24339 return false;
24340 elseif constexpr(is_function_t<T>)
24341 return false;
24342 elseif constexpr(::std::is_function_v<remove_cvref<T>>)
24343 return get_data_nothrow_helper<decltype(&declvalue(T))>();
24344 elseif constexpr(invoke<T>.with_return_type<Ret_t>.able<Args_t...>)
24346 else
24347 return false;
24348 }

◆ operator bool()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator bool ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp24407 行定义.

24407 {
24408 return bool(_m);
24409 }

◆ operator func_ptr_t()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator func_ptr_t ( ) const
inlineexplicitnoexcept

在文件 all_defs.cpp24432 行定义.

24432 {
24433 func_ptr_t a=(func_ptr_t)_m->get_func_ptr();
24434 if(a)return a;
24435 _func_ptr_data_local=base_t::_m.get();
24436 _func_ptr_data_gobal.store(_func_ptr_data_local,::std::memory_order_relaxed);
24437 return _func_ptr_value;
24438 }

◆ operator()()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
Ret_t elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator() ( Args_t...  args) const
inlinenoexcept

在文件 all_defs.cpp24411 行定义.

24411 {
24413 return base_t::call(forward<Args_t>(args)...);
24415 }
#define pop_msvc_warning()
Definition all_defs.cpp:478
#define push_and_disable_msvc_warning(...)
Definition all_defs.cpp:479

◆ operator=() [1/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( const T &  a) &
inlinenoexcept

在文件 all_defs.cpp24395 行定义.

24395 {
24397 return*this;
24398 }

◆ operator=() [2/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( const this_t a) &
defaultnoexcept

◆ operator=() [3/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( null_ptr_t  ) &
inlinenoexcept

在文件 all_defs.cpp24392 行定义.

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

◆ operator=() [4/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( nullptr_t  ) &
inlinenoexcept

在文件 all_defs.cpp24393 行定义.

24393{return *this=null_ptr;}

◆ operator=() [5/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
requires get_data_able<T>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( T &&  a)
inlinenoexcept

在文件 all_defs.cpp24400 行定义.

24400 {
24402 return*this;
24403 }

◆ operator=() [6/6]

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
this_t & elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::operator= ( this_t &&  a) &
defaultnoexcept

◆ swap_with()

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
void elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::swap_with ( this_t a)
inlinenoexcept

在文件 all_defs.cpp24371 行定义.

24371 {//不与base_t::swap_with重复:与更加严格(或宽松)的this_t进行swap是错误的
24373 }

友元及相关函数文档

◆ base_function_t

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class , bool >
friend class base_function_t
friend

在文件 all_defs.cpp24302 行定义.

类成员变量说明

◆ _m

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
ptr_t elc::defs::container::function_n::function_data_saver_t< Ret_t(Args_t...)>::_m
mutableprotected

在文件 all_defs.cpp24240 行定义.

◆ base_on_this_t_or_more_stringent_restrictions

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
constexpr bool elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::base_on_this_t_or_more_stringent_restrictions
staticconstexprprotected
初始值:
=(
type_info<T>.base_on<this_t>||
type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(bool(nothrow+1)), promise_nothrow_at_destruct >>||
type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(nothrow), bool(promise_nothrow_at_destruct+1) >>||
type_info<T>.base_on<base_function_t<Ret_t(Args_t...)noexcept(bool(nothrow+1)), bool(promise_nothrow_at_destruct+1) >>
)
constexpr type_info_t< T > type_info

在文件 all_defs.cpp24314 行定义.

◆ get_data_able

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
constexpr bool elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::get_data_able =get_data_able_helper<T>()
staticconstexprprotected

在文件 all_defs.cpp24335 行定义.

◆ get_data_nothrow

template<class Ret_t , class... Args_t, bool nothrow, bool promise_nothrow_at_destruct>
template<class T >
constexpr bool elc::defs::container::function_n::base_function_t< Ret_t(Args_t...) noexcept(nothrow), promise_nothrow_at_destruct >::get_data_nothrow =get_data_nothrow_helper<T>()
staticconstexprprotected

在文件 all_defs.cpp24350 行定义.


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