copy — copies elements. move — moves elements.
std::copy:
1std::vector<int> src = {1, 2, 3};2std::vector<int> dst(3);34std::copy(src.begin(), src.end(), dst.begin());5// src: 1, 2, 3 (unchanged)6// dst: 1, 2, 3
std::move (algorithm):
1std::vector<std::string> src = {"a", "b", "c"};2std::vector<std::string> dst(3);34std::move(src.begin(), src.end(), dst.begin());5// src: "", "", "" (moved from)6// dst: "a", "b", "c"
std::move (cast):
1std::string s1 = "hello";2std::string s2 = std::move(s1);3// s1 is now empty