News for hackers. Stuff that matters.
Re:Perils of Constructors by stinos on Saturday July 27, 2019 @12:00PM (#20542608)
Throwing from the middle of a constructor in C++ is a quagmire, so it's best not to do it

https://isocpp.org/wiki/faq/exceptions#ctors-can-throw for one disagrees, but it might not cover what you mean exactly. So: also in modern C++ (i.e. using RAII types)? Or do you mean other problems than leaking, do you have an example?

Re:Perils of Constructors by UncleMeat on Monday July 29, 2019 @10:21AM (#20554857)
Even though cpp11 has been around a while, there is a ton of code that isn't using smart pointers everywhere. This makes exception handling messy, especially with partially constructed objects.