fais une macro
#define DEFINE_GETTER_FOR(field,type) inline type get##field(void) { return this->field; }voire je crois en 2011
#define DEFINE_GETTER_FOR(field) inline auto get##field(void) { return this->field; }sinon a force d'avoir des trucs qui autoécrivent du code on oubliera comment coder
