#include <print>
#include <vector>
// v is a full copy; changing it cannot affect the caller
void clear_copy(std::vector<int> v) {
v.clear();
}
int main() {
std::vector<int> nums{1, 2, 3};
clear_copy(nums);
// still 3: the function mutated its own copy
std::println("{}", nums.size());
}the callee gets its own copy