diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-11 22:10:38 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-11 22:10:38 -0800 |
| commit | 6ece1871b1c4249c667d6f1ca096fcb12861303f (patch) | |
| tree | acbca86bd70c2c4c29fcca2f09c72eeb6da6a029 /toolsrc/include | |
| parent | e4d38bb874fe47317e1dd4128c013af882408bbf (diff) | |
| download | vcpkg-6ece1871b1c4249c667d6f1ca096fcb12861303f.tar.gz vcpkg-6ece1871b1c4249c667d6f1ca096fcb12861303f.zip | |
[vcpkg] Simplify code -- Maps::maybe_find is not very useful compared to iterators.
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/util.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 44d09ae15..3d56c1e10 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -31,22 +31,6 @@ namespace vcpkg::Util } } - namespace Maps - { - template<class PairType> - using FirstT = std::remove_reference_t<decltype(std::declval<PairType>().first)>; - - template<class Container, class K, class T = FirstT<ElementT<Container>>> - Optional<T&> maybe_find(Container&& assoc_container, const K& key) - { - auto it = assoc_container.find(key); - if (it == assoc_container.end()) - return nullopt; - else - return it->second; - } - } - template<class Cont, class Func> using FmapOut = decltype(std::declval<Func&>()(*begin(std::declval<Cont&>()))); |
