Changeset f67b4ef in mainline


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:
7320ca6
Parents:
e9027b5
git-author:
Dzejrou <dzejrou@…> (2018-04-23 19:58:10)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:21)
Message:

cpp: removed the allocator trick, map allocator is for the pair, not the value

File:
1 edited

Legend:

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

    re9027b5 rf67b4ef  
    6868    };
    6969
    70     struct key_value_allocator
    71     { /* DUMMY BODY */ };
    72 
    7370    template<class Value, class Size>
    7471    struct hash_table_bucket
     
    695692            iterator emplace(Allocator& alloc, Args&&... args)
    696693            {
    697                 // TODO: use allocator traits of allocator_type but pass alloc!
    698                 // TODO: also, try_emplace should be one level above (we don't know
    699                 //       keys)
     694                // TODO: implement
    700695            }
    701696
     
    956951}
    957952
    958 namespace std
    959 {
    960     template<>
    961     struct allocator_traits<aux::key_value_allocator>
    962     {
    963         template<class Alloc, class Key, class Value, class... Args>
    964         static void construct(Alloc& alloc, pair<Key, Value>* ptr, Args&&... args)
    965         {
    966             alloc.construct(&ptr->second, forward<Args>(args)...);
    967         }
    968     };
    969 }
    970 
    971953#endif
Note: See TracChangeset for help on using the changeset viewer.