Skip to main content

New answers tagged

1 vote

If null is a billion dollar mistake, what is the solution to represent a non-initialized object?

Just about what “non-initialised object” means in C++: You can have raw memory. Even trying to read it is undefined behaviour. Then a constructor can take raw memory and turn it first into an instance ...
gnasher729's user avatar
  • 45.9k

Top 50 recent answers are included