News for hackers. Stuff that matters.
Re:A bug in GCC that may cause memory leaks in valid C++ pro... by Arnavion on Thursday April 27, 2017 @05:23PM (#14214829)
C++ constructors can't return error codes or Result. That's the two-stage initialization (constructor call + initialize() call) wvenable is talking about.

(Of course you could do the same thing as Rust and expose only a static creator function and hide the actual constructor.)

Re:A bug in GCC that may cause memory leaks in valid C++ pro... by vvanders on Thursday April 27, 2017 @05:34PM (#14214916)
Yeah, most projects I worked on was doing the static creator before Rust showed up on the scene since it sidesteps a lot of these issues.