News for hackers. Stuff that matters.
Re:We used C++20 to eliminate a class of runtime bugs by jcelerier on Saturday January 15, 2022 @03:16AM (#29944747)
Actually in C++ the vast majority of the time, the right thing to do is

    Foo foo{args};

Which is simpler than the other cases, more correct and more performant. The rare few times dynamic allocation of something that is not an array with new is needed is when you have polymorphic types - but then, the user code generally calls a factory function instead of new.

There are no comments on this comment yet.