Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::function_ref::operator=

      From cppreference.com
      <cpp‎ |utility‎ |functional‎ |function ref
       
       
      Utilities library
       
      Function objects
      Function invocation
      (C++17)(C++23)
      Identity function object
      (C++20)
      Old binders and adaptors
      (until C++17*)
      (until C++17*)
      (until C++17*)
      (until C++17*)  
      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
      (until C++17*)(until C++17*)
      (until C++17*)(until C++17*)

      (until C++17*)
      (until C++17*)(until C++17*)(until C++17*)(until C++17*)
      (until C++20*)
      (until C++20*)
       
       
      constexpr function_ref& operator=(const function_ref&)noexcept=default;
      (1)(since C++26)
      template<class T>
      constexpr function_ref& operator=( T)= delete;
      (2)(since C++26)
      1) Copy assignment operator is explicitly-defaulted.std::function_ref satisfiescopyable andTriviallyCopyable. This defaulted assignment operator performs a shallow copy of the storedthunk-ptr andbound-entity.
      2) User-defined assignment operator is explicitly-deleted ifT is not the same type asstd::function_ref,std::is_pointer_v<T> isfalse, andT is not a specialization ofstd::nontype_t. This overload participates in overload resolution only if the constraints are satisfied in the conditions above.

      [edit]Return value

      *this

      [edit]See also

      constructs a newfunction_ref object
      (public member function)[edit]
      replaces or destroys the target
      (public member function ofstd::copyable_function)[edit]
      assigns a new target
      (public member function ofstd::function<R(Args...)>)[edit]
      replaces or destroys the target
      (public member function ofstd::move_only_function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/functional/function_ref/operator%3D&oldid=178009"

      [8]ページ先頭

      ©2009-2025 Movatter.jp