You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest to add a trait that returns a tuple of all the functions called by a given function, including run-time functions.
void foo() {}
void bar() {}
void spam() { foo(); bar(); }
is(__traits(calledFunctions, spam) == TypeTuple!(foo, bar))
This is useful to implement in user code transitive function properties tagged with UDAs.
Optionally this trait too can be handy:
__traits(isRuntimeFunction, f)
The text was updated successfully, but these errors were encountered:
bearophile_hugs reported this on 2014-08-15T19:05:42Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=13298
Description
I suggest to add a trait that returns a tuple of all the functions called by a given function, including run-time functions. void foo() {} void bar() {} void spam() { foo(); bar(); } is(__traits(calledFunctions, spam) == TypeTuple!(foo, bar)) This is useful to implement in user code transitive function properties tagged with UDAs. Optionally this trait too can be handy: __traits(isRuntimeFunction, f)The text was updated successfully, but these errors were encountered: