On Monday, 18 May 2015 at 11:57:29 UTC, Per Nordlöw wrote:
Could yet another function qualifier (or extended attribute) do the job of checking this at compile time?

For comparison here's how M$ has solved it in their proposal under include <experimental/generator>

http://blogs.msdn.com/b/vcblog/archive/2014/11/12/resumable-functions-in-c.aspx

They specify yielded type a function header instead of at caller as

    generator<int> fib()

which is probably a bit less error prone.

Reply via email to