Summary:
We recently removed declarations of Function constructors and
assignment operators that took non-const Function references. They
were necessary at the time to make sure that the templated
constructor that can take any invokable object did not get
selected for copying Functions from non-const lvalues. This,
however, is now provided by some std::enable_if construct.
Reviewed By: ericniebler
Differential Revision:
D4818736
fbshipit-source-id:
08197721beef009f6ae482b576df78ec6999d132
} // namespace function
} // namespace detail
-FOLLY_PUSH_WARNING
-FOLLY_MSVC_DISABLE_WARNING(4521) // Multiple copy constructors
-FOLLY_MSVC_DISABLE_WARNING(4522) // Multiple assignment operators
template <typename FunctionType>
class Function final : private detail::function::FunctionTraits<FunctionType> {
// These utility types are defined outside of the template to reduce
return std::move(*this).asSharedProxy();
}
};
-FOLLY_POP_WARNING
template <typename FunctionType>
void swap(Function<FunctionType>& lhs, Function<FunctionType>& rhs) noexcept {