Variable IsAttributedParameter

Checks if parameter is calculated by one of attached functions.

Declaration

module vibe.internal.meta.funcattr;

// ...
void IsAttributedParameter(alias Function, string name);
// ...

Parameters

NameDescription
Function function symbol to query for attributes
name parameter name to check

Returns

`true` if it is calculated

Example

int foo()
{
	return 42;
}

@before!foo("name1")
void bar(int name1, double name2)
{
}

static assert (IsAttributedParameter!(bar, "name1"));
static assert (!IsAttributedParameter!(bar, "name2"));
static assert (!IsAttributedParameter!(bar, "oops"));

Authors

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

Copyright

© 2013 RejectedSoftware e.K.

License

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