#include <functional>

struct foo {
  void operator()() {}
};

int main() {
  foo bar;
  std::function<void()> test;
  test = std::move(bar);
}
