__traits() to get parameter details only ? ... hasMember looks up everything within

someone someone at somewhere.com
Wed Aug 4 22:01:21 UTC 2021


On Wednesday, 4 August 2021 at 20:13:53 UTC, Steven Schveighoffer 
wrote:
> On 8/4/21 11:08 AM, someone wrote:
>
> Have you looked at 
> [std.traits](https://dlang.org/phobos/std_traits.html) at all? 
> It does a lot of stuff, including giving you parameter names 
> and types.

No. I didn't know it ever existed :(

You mean something like:

```d
import std.traits : ParameterIdentifierTuple;

static if ([ParameterIdentifierTuple!classTickerCustom%1$s] == 
["lstrSymbolID", "lstrCurrencyID"]) {

    ...

}

```




More information about the Digitalmars-d-learn mailing list