C++14 interface extensions for base::flat_set/flat_map have landed! (
cl). Now functions that require lookup (
erase, count, find, equal_range, lower_bound, upper_bound) if the comparison is transparet accept any type comparable with key_type, not just key_type itself. This means that you can do lookup in the set of std::strings by const char* or base::StringPiece without constructing temporary variables. This also means that flat_set of unique_ptrs now can be used in a natural way, even though we don't have a ready to go comparator in base (the default one won't work since std::unique_ptr is not comparible with plain pointers).
You can find more information and some examples in updated
docs.
пятница, 10 марта 2017 г., 11:23:21 UTC+3 пользователь Peter Kasting написал: