std::thread not constructive for copying, you will have to use an iterator that allows you to navigate:
m1.insert(std::make_move_iterator(m2.begin()), std::make_move_iterator(m2.end());
std::make_move_iterator returns a specialized iterator std::move_iterator , whose access members ( operator*() and operator->() ) return rvalues references, unlike built-in iterators that return lvalues. map::insert() delegates its operation map::emplace() , where it translates the argument into an element type.
Copy constructors of your threads were created because the objects returned from the built-in iterators were sent as lvalues and thus were copied.
source share