The beauty and simplicity of the good old C-style void* in C++
2 days ago
- #Code Simplicity
- #C++ Programming
- #Memory Management
- Discusses declaring a function to handle a memory blob in C++, comparing void* and uint8_t* approaches.
- Highlights simplicity of void* with structs, avoiding explicit casts needed for uint8_t*.
- Critiques modern C++ trends like std::span for adding unnecessary complexity over void*.
- Recommends using void* with SAL annotations for clarity and safety without complicating code.