Skip to content

Instantly share code, notes, and snippets.

@thiagomg thiagomg/config.h
Created Feb 4, 2016

Embed
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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.