[libcxx-commits] [PATCH] D59344: Add contains method to map types
Joe Loser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 4 07:27:59 PDT 2019
jloser added inline comments.
================
Comment at: include/map:1408
+
+ _LIBCPP_INLINE_VISIBILITY
+ bool contains(const key_type& __k) const {return find(__k) != end();}
----------------
I think we should only provide the declaration and definition of `contains` when `_LIBCPP_STD_VER > 17`. Otherwise, someone compiling with trunk and `-std=c++14` would be able to use `contains`, and this is only meant for C++20 or later.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59344/new/
https://reviews.llvm.org/D59344
More information about the libcxx-commits
mailing list