3 ms·
> It doesn't warn you that vectors of raw pointers are bad parameter types, for example. Vectors of raw pointers function very effectively, they just have all
by cbsmith 10y ago
> It doesn't warn you that vectors of raw pointers are bad parameter types, for example.
Vectors of raw pointers function very effectively, they just have all the problems intrinsic with the use of raw pointers. I'm not sure I'd blame the vector documentation for that...
> It does talk about iterator invalidation, but it doesn't really educate us about how that affects our designs.
Design implications are a subtle thing that you can write entire books about. I think failing to fully capture those implications in the API documentation is more than understandable and far from unusual. For example, Java's containers have similar issues with iterator invalidation, and similarly don't have documentation on all the design implications.