News for hackers. Stuff that matters.
Re:C++17 and its Technical Specifications by sbmassey on Thursday March 03, 2016 @08:41PM (#11221467)
How about wrapping the return value in a templated error class that the caller has to explicitly unwrap with an error handler to be able to use?
Re:C++17 and its Technical Specifications by azov on Thursday March 03, 2016 @08:50PM (#11221514)
That will help if there is a value to return - but then it's not much better than just returning something invalid, like a NULL pointer. If the only return value is success/failure you need compiler support (1) to ensure it's not ignored.

(1) There are clever hacks to mimic this behavior to some extent, but I don't even want to go there. If you really want this feature - just use a language that has it.