miker2 / flexi_config_reader

A flexible configuration format that supports templated tables and referencing of existing keys.
MIT License
3 stars 1 forks source link

Implement `[]` operator for direct access to elements of a struct #116

Open michael-projectx opened 1 year ago

michael-projectx commented 1 year ago

A struct:

struct foo {
  key = 1

  struct bar {
    key = 2
  }
}

Should be accessible via cfg['foo']['key'] or cfg['foo']['bar']['key']

michael-projectx commented 10 months ago

Start out by making this only work for objects of type flexi_cfg::Reader. That should be pretty straight-forward