Ignore:
Timestamp:
2018-07-05T21:41:21Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
170761c
Parents:
b24bb1c
git-author:
Dzejrou <dzejrou@…> (2018-04-24 20:21:53)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:21)
Message:

cpp: added a constructor and getters needed by unordered_map and others

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/internal/hash_table.hpp

    rb24bb1c r8ec1cd2  
    716716            { /* DUMMY BODY */ }
    717717
     718            hash_table(size_type buckets, const hasher& hf, const key_equal& eql,
     719                       float max_load_factor = 1.f)
     720                : table_{new hash_table_bucket<value_type, size_type>[buckets]()},
     721                  bucket_count_{buckets}, size_{}, hasher_{hf}, key_eq_{eql},
     722                  key_extractor_{}, max_load_factor_{max_load_factor}
     723            { /* DUMMY BODY */ }
     724
     725            // TODO: copy/move constructor/assignment operator
     726
    718727            bool empty() const noexcept
    719728            {
     
    10931102            }
    10941103
     1104            hasher hash_function() const
     1105            {
     1106                return hasher_;
     1107            }
     1108
     1109            key_equal key_eq() const
     1110            {
     1111                return key_eq_;
     1112            }
     1113
    10951114        /* private: */
    10961115            hash_table_bucket<value_type, size_type>* table_;
Note: See TracChangeset for help on using the changeset viewer.