Skip to content

Commit

Permalink
Merge pull request #51 from Alinshans/v2
Browse files Browse the repository at this point in the history
📋 Add some notes.
  • Loading branch information
Alinshans authored Aug 19, 2017
2 parents 168eaa3 + 78143ab commit f12ba77
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MyTinySTL/deque.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
// 这个头文件包含了一个模板类 deque
// deque: 双端队列

// notes:
//
// 异常保证:
// mystl::deque<T> 满足基本异常保证,部分函数无异常保证,并对以下等函数做强异常安全保证:
// * emplace_front
// * emplace_back
// * emplace
// * push_front
// * push_back
// * insert

#include <initializer_list>

#include "iterator.h"
Expand Down
11 changes: 11 additions & 0 deletions MyTinySTL/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
// 这个头文件包含了一个模板类 list
// list : 双向链表

// notes:
//
// 异常保证:
// mystl::list<T> 满足基本异常保证,部分函数无异常保证,并对以下等函数做强异常安全保证:
// * emplace_front
// * emplace_back
// * emplace
// * push_front
// * push_back
// * insert

#include <initializer_list>

#include "iterator.h"
Expand Down
8 changes: 8 additions & 0 deletions MyTinySTL/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
// map : 映射,元素具有键值和实值,会根据键值大小自动排序,键值不允许重复
// multimap : 映射,元素具有键值和实值,会根据键值大小自动排序,键值允许重复

// notes:
//
// 异常保证:
// mystl::map<Key, T> / mystl::multimap<Key, T> 满足基本异常保证,对以下等函数做强异常安全保证:
// * emplace
// * emplace_hint
// * insert

#include "rb_tree.h"

namespace mystl
Expand Down
8 changes: 8 additions & 0 deletions MyTinySTL/set.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
// set : 集合,键值即实值,集合内元素会自动排序,键值不允许重复
// multiset : 集合,键值即实值,集合内元素会自动排序,键值允许重复

// notes:
//
// 异常保证:
// mystl::set<Key> / mystl::multiset<Key> 满足基本异常保证,对以下等函数做强异常安全保证:
// * emplace
// * emplace_hint
// * insert

#include "rb_tree.h"

namespace mystl
Expand Down
8 changes: 8 additions & 0 deletions MyTinySTL/unordered_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
// 这个头文件包含两个模板类 unordered_map 和 unordered_multimap
// 功能与用法与 map 和 multimap 类似,不同的是使用 hashtable 作为底层实现机制,容器内的元素不会自动排序

// notes:
//
// 异常保证:
// mystl::unordered_map<Key, T> / mystl::unordered_multimap<Key, T> 满足基本异常保证,对以下等函数做强异常安全保证:
// * emplace
// * emplace_hint
// * insert

#include "hashtable.h"

namespace mystl
Expand Down
8 changes: 8 additions & 0 deletions MyTinySTL/unordered_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
// 这个头文件包含两个模板类 unordered_set 和 unordered_multiset
// 功能与用法与 set 和 multiset 类似,不同的是使用 hashtable 作为底层实现机制,容器中的元素不会自动排序

// notes:
//
// 异常保证:
// mystl::unordered_set<Key> / mystl::unordered_multiset<Key> 满足基本异常保证,对以下等函数做强异常安全保证:
// * emplace
// * emplace_hint
// * insert

#include "hashtable.h"

namespace mystl
Expand Down

0 comments on commit f12ba77

Please sign in to comment.