4 ms·
And how was std:copy implemented? Your answer is valid only for a programming language which assumes that the standard library is implemented in another langua
by adrian_b 5mo ago
And how was std:copy implemented?
Your answer is valid only for a programming language which assumes that the standard library is implemented in another language.
C/C++ are supposed to be languages in which any program can be written, unlike languages like Java or Python.
- AnimalMuppet 5mo agoYes, C++ has those parts. You can use them to write something like std::copy. But use them, once, to write std::copy, and get that one implementation right (or have the library writers do it for you), and then use std::copy everywhere, rather than using void* everywhere. This makes your program much more type safe and less buggy, while still letting you write the parts where you really need to use the down-and-dirty stuff.
- pjmlp 5mo agoYou cannot implement modern C++ in pure C++ nowadays, as the standard library requires compiler intrisics, just like a language like Java.