Changeset 255bb63 in mainline


Ignore:
Timestamp:
2018-07-05T21:41:22Z (6 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aa0fa86a
Parents:
8a7da64d
git-author:
Dzejrou <dzejrou@…> (2018-05-01 21:00:10)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
Message:

cpp: added map::at

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/impl/map.hpp

    r8a7da64d r255bb63  
    294294            }
    295295
     296            mapped_type& at(const key_type& key)
     297            {
     298                auto it = find(key);
     299
     300                // TODO: throw out_of_range if it == end()
     301                return it->second;
     302            }
     303
     304            const mapped_type& at(const key_type& key) const
     305            {
     306                auto it = find(key);
     307
     308                // TODO: throw out_of_range if it == end()
     309                return it->second;
     310            }
     311
    296312            /**
    297313             * 23.4.4.4, modifiers:
Note: See TracChangeset for help on using the changeset viewer.