Skip to content

Instantly share code, notes, and snippets.

@masazdream
Created August 3, 2013 07:00
Show Gist options
  • Save masazdream/6145520 to your computer and use it in GitHub Desktop.
Save masazdream/6145520 to your computer and use it in GitHub Desktop.
MEMO: 配列コピーの関数
template<class II, class OI> inline OI std_copy(II in, II end, OI out) {
for (; in != end; ++in, ++out) *out = *in;
return out;
}
int main() {
int a [] = {1, 2, 3};
int b [] = {4, 5, 6};
std_copy(a, a + 3, b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment