Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Leitura de configuração em C++
using adder_func = std::function<void(const std::pair<Key,Value> &pair)>;
void iterate_and_check(const Key &prefix, adder_func f_adder) const {
std::for_each(begin(_items), end(_items), [&prefix, &f_adder](const std::pair<Key,Value> &pair) {
//let's check prefix
if( std::equal( begin(prefix), end(prefix), begin(pair.first) ) )
f_adder(pair);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment