News for hackers. Stuff that matters.
Re:What =delete means by klyrs on Monday October 18, 2021 @03:24PM (#28910308)
> C++ constructors cannot express fallibility.

No, they can. They can throw exceptions. My suggestion moves unsafe-construction onto the heap. Not ideal for a whole host of reasons, including a need to null-check the result -- but you can then move the object to the stack, and drop the unique_ptr. But if you're tying one hand behind your back, contortions will be necessary to accomplish the mundane.

Re:What =delete means by gpderetta on Monday October 18, 2021 @04:08PM (#28910932)
You can have a named factory function returning an optional<T> (or your preferred fallible type).
Re:What =delete means by klyrs on Monday October 18, 2021 @04:34PM (#28911330)
Right, right... I still haven't adopted the '17 features yet.