wil::reg functions need an enumeration function to walk values and keys
keith-horton opened this issue · comments
Keith Horton commented
Feature Request: need to add functions to enumerate values and keys which return an object that supports iterator semantics for ranged-for loops and algorithms, as well as supporting ranges.
e.g., walking dword values under a registry key:
for (const auto& value_name : wil::reg::enumerate_values(key)
{
auto value = wil::reg::get_value_dword(key, value_name);
}
Chris Guzak commented
and
for (auto&& [key, value] : wil::reg::enumerate_names_and_values(key)
{
}
Chris Guzak commented
here was my first run at this. I'm sure it needs improvements.
Keith Horton commented
We had a tested implementation earlier - it was removed as folks requested the initial commit be much simpler.
wil_iterator.txt