低効率なSTLサブセットを「書きました」


tinySTL
私は『STLソース剖析』を参考にして、低効率なSTLサブセットを書きました.コードには比較的詳細な注釈があり、「STLソース剖析」を読む補助材料とすることができる.
本プロジェクトは本人の練習項目なので、しばらくテストを提供していないので、完全に正確であることは保証できません.どうかお許しください.
どのように「低効率」になったのか、私は後でいくつかの私がすでに低効率の実現を予見できることを整理します.お楽しみに.
ソースコード
Github.
完了
  • スペースコンフィギュレータ
  • 通常反復器
  • 逆反復器
  • vector
  • list
  • deque
  • stack
  • queue
  • heap
  • priority_queue
  • rb_tree(GitHubからの実装)
  • set
  • multiset
  • map
  • multimap
  • hashtable(その他のhash関数はhereを参照)
  • unordered_set
  • unordered_map
  • unordered_multiset
  • unordered_multimap
  • type traits
  • integral_constant
  • true_type
  • false_type
  • is_same
  • is_integral
  • remove_reference
  • remove_reference_t
  • add_lvalue_reference
  • add_lvalue_reference_t
  • add_rvalue_reference
  • add_rvalue_reference_t
  • __type_traits

  • アルゴリズム
  • all_of
  • any_of
  • none_of
  • for_each
  • count
  • count_if
  • mismatch
  • find
  • find_if
  • find_if_not
  • find_end
  • find_first_of
  • adjacent_find
  • search
  • search_n
  • copy
  • copy_if
  • copy_n
  • copy_backward
  • move
  • move_backward
  • remove
  • remove_if
  • remove_copy
  • remove_copy_if
  • replace
  • replace_if
  • replace_copy
  • replace_copy_if
  • swap
  • swap_ranges
  • iter_swap
  • reverse
  • reverse_copy
  • rotate
  • rotate_copy
  • unique
  • unique_copy
  • is_partitioned
  • partition
  • partition_copy
  • max
  • max_element
  • min
  • min_element
  • equal
  • lexicographical_compare
  • move

  • functional
  • hash
  • plus
  • minus
  • multiplies
  • divides
  • modulus
  • negate
  • equal_to
  • not_equal_to
  • greater
  • less
  • greater_equal
  • less_equal
  • logical_and
  • logical_or
  • logical_not
  • bit_and
  • bit_or
  • bit_xor
  • identity
  • select1st
  • select2nd

  • utility
  • initializer_list
  • forward
  • move
  • pair
  • make_pair

  • numeric
  • iota
  • accumulate
  • inner_product
  • adjacent_difference
  • partial_sum

  • memory(単純実装)
  • shared_ptr
  • weak_ptr
  • unique_ptr
  • addressof
  • uninitialized_copy
  • uninitialized_copy_n
  • uninitialized_fill
  • uninitialized_fill_n

  • cstring
  • strcpy
  • strncpy
  • memcpy


  • TODO
  • 異常保証
  • allocator staticメンバー関数問題
  • bitset
  • dynamic_bitset
  • string

  • 悟る
  • STLをさらに熟知し、STLの多くのインタフェースに対してより直感的な認識を持っている.
  • は、コピー(移動)コンストラクション関数、コピー関数の意味、および使用シーンの理解を開始する.