mercredi 1 juillet 2020

Will the wait_pop_head function return unspecified data?

In 《c++ concurrency in action》page 167, enter image description here

1)value=std::move(*head->data); // Data will be moved if T has move-constructor.

2)std::unique_ptr old_head=std::move(head); // now the data references to unspecified T ?

enter image description here

Aucun commentaire:

Enregistrer un commentaire