In file included from /usr/include/c++/8/algorithm:62,
from prog.cpp:2:
/usr/include/c++/8/bits/stl_algo.h: In instantiation of ‘void std::generate(_FIter, _FIter, _Generator) [with _FIter = __gnu_cxx::__normal_iterator<Foo*, std::vector<Foo> >; _Generator = main()::<lambda()>]’:
prog.cpp:27:55: required from here
/usr/include/c++/8/bits/stl_algo.h:4436:11: error: use of deleted function ‘constexpr Foo& Foo::operator=(const Foo&)’
*__first = __gen();
~~~~~~~~~^~~~~~~~~
prog.cpp:6:7: note: ‘constexpr Foo& Foo::operator=(const Foo&)’ is implicitly declared as deleted because ‘Foo’ declares a move constructor or move assignment operator
class Foo
^~~