mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
Iterate over the object's members and call a filter callable to decide what to do with the current key/value. A filter returns one of the `FilterResult` values. A container type is an associative or a sequence container of pairs (key, value). Refactor `MapFilter()` and `Map()` to use `FilteredObject()`. Moreover, for C++ >= 17 implementation is more optimized depending on the given filter object type and capable of detecting and properly calling the filter callable using 1 or 3 arguments, up to totally eliminate any checking (even dummy) in the generated code. Supported container types, used to append key/value items, aren't limited to `std::map` only and can be any associative container or a sequenced one with pairs of key/value as elements.
15 KiB
15 KiB