- 博客(5)
- 收藏
- 关注
原创 deque 内存块管理
int arr0[2]={1,2}; int arr1[2]={3,4}; int arr2[2]={5,6}; int* arrctl[4]; arrctl[0] = arr0; arrctl[1] = arr1; arrctl[2] = arr2; int **arrmap = arrctl;
2012-12-13 18:02:16 410
原创 list sort
while (!empty()) { //把*this的第一个元素移到carry中,由于carry原来是空的,所以现在carry有了一个元素, //而*this则少了一个元素,每次循环*this都会少一个元素,直到空了为止 carry.splice(carry.begin(), *this, begin()); //对counter数组中最前面的非空项进行处理 //
2012-12-11 17:55:12 231
原创 stl template
#include #include #include using namespace std; void test_macro() { #if defined(__sgi) cout<<"__sgi"<<endl; #endif // case 2 #ifdef __STL_NO_DRAND48 cout << "__STL_NO_DRAND48 defined" << e
2012-12-10 22:13:02 486
原创 type_traits
#include namespace namespace269 { /** 2两个空白类,没有任何成员,不会带来额外负担,却能通过类型代表真假,可以用于函数特化参数 */ struct __true_type { }; struct __false_type { }; template struct __type_traits {
2012-12-10 22:05:57 2229
原创 iterator_traits
#include using namespace std; ///////////////////////////////////////////////////////////////////////////////// interator type tags struct my_input_iterator_tag{}; struct my_output_iterator_tag{};
2012-12-10 21:55:41 420
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人