typedef boost::variant<int, string, bool> field_t;
typedef std::map<string, field> settings_t;
struct A
{
A(file)
: settings_(file.parse())
{}
private:
settings_t settings_;
int my_method()
{
int a = boost::get<int>(settings_["a"]);
int b = boost::get<int>(settings_["b"]);
return a + b;
}
}