https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80711
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to David Binderman from comment #8) > My opinion is that a first approximation at implementation in gcc would > merely look for C++ member functions that are return statements only. > More fancy things could be done later in a second version. No, that won't work: struct Iota { int i = 0; int operator()() { return i++; } };