News for hackers. Stuff that matters.
Re:C++ Programming Questions to Ask on Interview (2017) by edflsafoiewq on Friday October 19, 2018 @01:32AM (#18254424)
That std::unique_ptr has a deleted copy constructor is not minutia! The huge program of C++11 to deprecate auto_ptr, redefine value categories, introduce rvalue-references and move constructors, &c. had the creation of a move-only smart pointer as one of its most proximate goals.
Re:C++ Programming Questions to Ask on Interview (2017) by cjensen on Friday October 19, 2018 @11:59AM (#18257644)
A thing can be a design goal and minutiae at the same time. The design goal was to reduce accidental errors in code, particularly by the incautious and by learners. But for a practitioner who clearly understands the concept, the exact way in which you must accomplish an operation permitted by the concept is just "however the library wants you to do it" minutiae.
Re:C++ Programming Questions to Ask on Interview (2017) by geezerjay on Friday October 19, 2018 @03:07PM (#18259135)
> The design goal was to reduce accidental errors in code, particularly by the incautious and by learners

No, it really isn't. The whole point of a unique pointer is to ensure that the pointer is in fact unique. Thus, std::unique_ptr is specifically designed to disallow any form of copying.