January 2018
Intermediate to advanced
374 pages
9h 53m
English
The standard C library comes with a couple of low-level algorithms such as memcpy(), memmove(), memcmp(), and memset(). In our experience, sometimes people tend to use these functions instead of their equivalents in the STL algorithm library. The reason is that people tend to believe that the C library functions are faster and, therefore, accept the trade off in type safety.
This is not true for modern STL implementation; the equivalent STL algorithms, std::copy(), std::equal() , and std::fill(), resort to these low-level C functions where plausible; hence, they provide both performance and type safety.
Note that there might be exceptions where the C++ compiler is not able ...