I’ve looked at cppreference.com and they seem to indicate no noexcept specification on std::function(std::function&&). This seems rather odd to me. Does the standard really not give a nothrow guarantee in this case?
I’ve looked at cppreference.com and they seem to indicate no noexcept specification on std::function(std::function&&)
Share
I imagine that the
functionobject is capable of storing an arbitrary, user-defined, callable object. When you move thefunctionobject, that contained, user-defined object is moved as well, and there are no guarantees that this can be done without exceptions.