添加swap

This commit is contained in:
邹晓航
2014-10-12 14:54:02 +08:00
parent ab840b2a33
commit 1c00451748
5 changed files with 22 additions and 3 deletions

13
TinySTL/Utility.h Normal file
View File

@@ -0,0 +1,13 @@
#ifndef _UTILITY_H_
#define _UTILITY_H_
namespace TinySTL{
//************ [swap] ***************
template<class T>
void swap(T& a, T& b){
T temp = a;
a = b;
b = temp;
}
}
#endif