You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fails to compile as well, see here, as the const pointer cannot be returned any more.
Interestingly, none of these occur in the book. It might hence be better to use the code from the book instead. I wonder why those two are out of sync though :-)
Lastly, in Listing 6.9, a local object is moved, see here
return std::move(head_lock);
This prevents copy elision, and leads to an error with my compiler as well. A simple return would do here. This is in the Listing here and in the book.
Cheers
Lucas
The text was updated successfully, but these errors were encountered:
Hi there!
Listing 6.9 and 6.10 contain a comparison of a
unique_ptr
with a raw pointer:See here and here, which fails to compile.
This is done correctly in other places in Listing 6.10 though, where
head.get()
is used instead.Furthermore, Listing 6.9 declares a
unique_ptr const
This fails to compile as well, see here, as the const pointer cannot be returned any more.
Interestingly, none of these occur in the book. It might hence be better to use the code from the book instead. I wonder why those two are out of sync though :-)
Lastly, in Listing 6.9, a local object is moved, see here
This prevents copy elision, and leads to an error with my compiler as well. A simple return would do here. This is in the Listing here and in the book.
Cheers
Lucas
The text was updated successfully, but these errors were encountered: