|
|
|
|
|
by moregrist
956 days ago
|
|
Please define “normal”. Normal C++ for me runs the gamut of looking a lot like C to be a template metaprogramming monstrosity. Almost all C++ code interacts with bare pointers at some point. And that’s just one of the places where you get into issues with safety. You can also run into problems with iterators being invalidated: your iterator into a std::vector is no longer valid after a call to push_back(). Anything that stores a reference and can exist after the lifetime of the object, really. Lambdas are a problem here. But so are instances with reference members. C++ is littered with these things. |
|
This is a device driver. If it has to talk to memory-mapped hardware, that's a raw pointer, inherently, inevitably.
Other things are language issues, and can be solved by changing languages, but raw pointers are inherent in the task.