News for hackers. Stuff that matters.
Re:Current hardware trends make C++ exceptions harder to jus... by roger10-4 on Tuesday February 22, 2022 @01:42PM (#30431749)
You can’t return null from a constructor (constructors have no return)
Re:Current hardware trends make C++ exceptions harder to jus... by worik on Tuesday February 22, 2022 @11:34PM (#30437672)
What dumb design.

I thought the constructor returned a pointer to the memory created.

No return? Stupid!

Re:Current hardware trends make C++ exceptions harder to jus... by gpderetta on Wednesday February 23, 2022 @08:01AM (#30440489)
FWIW, constructors do not "create" (I assume you mean allocate) memory. That's the job of operator new. A constructor, given a block of untyped memory, will construct an object in it.
Re:Current hardware trends make C++ exceptions harder to jus... by worik on Wednesday February 23, 2022 @02:36PM (#30445280)
Right.

Been a long time.

I would still expect a constructor to return. How can you tell if it failed?