You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dabrahams edited this page Aug 6, 2012
·
6 revisions
Overloading Function Templates
1. Write a function template Copy that takes two pointers p and q of the same type and a std::size_t n, and copies n adjacent elements starting at p into the array starting at q
2. Overload Copy with a function that copies ints by using std::memcpy
3. Overload Copy with a function template that copies an array of any pointer type using std::memcpy
4. Verify that the “right” function is called automatically