As a follow up to the most

http://forum.dlang.org/thread/miri9k$2p5$1...@digitalmars.com

I'm now very much interested in finding a way to make yield() capture the UDAs of its caller. That is instead of

void yield(T)(ref T value)

I want it to get a hold of the UDAs of the calling function and somehow propagate them as compile-time template arguments. Something like

void yield(T, callerAttributes = __traits(getAttributes, __FUNCTION__))(ref T value)

The problem with this is that __FUNCTION__ is a string when getAttributes expects a symbol. Can I somehow can a hold of the symbol of the caller.

Is this doable somehow?

Reply via email to