Function createAttributedFunction

Syntax sugar in top of AttributedFunction

Creates AttributedFunction with stored argument types that match `T` and stores `args` there before returning.

Prototype

auto createAttributedFunction(alias Function, T...)(
  cloneFunction.T args
);

Example

void foo() {}

auto funcattr = createAttributedFunction!foo(1, "2", 3.0);

import std.typecons : tuple;
assert (tuple(funcattr.m_storedArgs) == tuple(1, "2", 3.0));

Authors

Михаил Страшун

Copyright

© 2013 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.