Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Leitura de configuração em C++
struct my_value {
std::string sval;
using const_iterator = std::string::const_iterator;
};
//...
auto cfg = configuration::load<std::string, my_value>(fname,
[](auto &config, iter_type b, iter_type m, iter_type e) {
std::string k(b, m);
my_value mv;
mv.sval = std::string(m+1, e);
config.add_item( k, mv );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment