命名空间
变体
操作

std::function_ref::operator=

来自 cppreference.cn
 
 
 
函数对象
函数调用
(C++17)(C++23)
恒等函数对象
(C++20)
透明运算符包装器
(C++14)
(C++14)
(C++14)
(C++14)  
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)
(C++14)

旧绑定器和适配器
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)
(直到 C++17*)  
(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
(直到 C++17*)(直到 C++17*)
(直到 C++17*)(直到 C++17*)

(直到 C++17*)
(直到 C++17*)(直到 C++17*)(直到 C++17*)(直到 C++17*)
(直到 C++20*)
(直到 C++20*)
 
 
constexpr function_ref& operator=( const function_ref& ) noexcept = default;
(1) (C++26 起)
template< class T >
constexpr function_ref& operator=( T ) = delete;
(2) (C++26 起)
1) 复制赋值运算符被显式默认。`std::function_ref` 满足 `copyable`TriviallyCopyable。这个默认的赋值运算符执行存储的 `thunk-ptr` 和 `bound-entity` 的浅复制。
2) 如果 T 与 `std::function_ref` 类型不同,std::is_pointer_v<T>false,且 T 不是 std::nontype_t 的特化,则用户定义的赋值运算符被显式删除。此重载仅在满足上述条件时参与重载决议。

[编辑] 返回值

*this

[编辑] 参阅

构造一个新的 `function_ref` 对象
(public 成员函数) [编辑]
替换或销毁目标
(std::copyable_function 的 public 成员函数) [编辑]
赋值一个新的目标
(std::function<R(Args...)> 的 public 成员函数) [编辑]
替换或销毁目标
(std::move_only_function 的 public 成员函数) [编辑]