C++ map: stl source code.

0 引言

Map 是C++ stl中最重要且常用的数据结构之一,但是有时候在gdb中打印相关的数据时感觉有些困难。因此,感觉有必要研究一下这个问题。

file: stl_map.h, stl_tree.h

 

 

 

1 data structure

class _Rb_tree {
  
};



class map {   typedef _Rb_tree<key_type, value_type, _Select1st<value_type>>, key_compare, _Pair_alloc_type> _Rep_type;   _Rep_type _M_t; ///< the actual tree structure.   size() {return _M_t.size();} ///< stl_tree.h: size() {return _M_impl._M_node_count; }
  
  
};

  

 

2 meaning

 

3. others

posted @ 2022-04-06 10:59  十步一杀2017  阅读(76)  评论(0编辑  收藏  举报