ParameterIdentifierTuple returns empty strings
user1234
user1234 at 12.de
Wed Dec 2 13:00:27 UTC 2020
On Wednesday, 2 December 2020 at 11:46:26 UTC, Andre Pany wrote:
> Hi,
>
> I need to retrieve the parameter identifier but only empty
> strings are returned:
> tuple("", "")
>
> ``` d
> alias fpt = extern(C) nothrow void function(int a, int b);
>
> void main()
> {
> import std.traits : ParameterIdentifierTuple;
> pragma(msg, ParameterIdentifierTuple!(fpt));
> }
> ```
>
> Where is here the error?
>
> Kind regards
> André
If you look at the template [1] implementation, function pointers
are rejected, apparently because of a `__parameters` limitation.
There something to report. Bad documentation at least.
[1]:
https://github.com/dlang/phobos/blob/2c0660141748a13637ff473cbb7b0d52eb1c44db/std/traits.d#L1400
More information about the Digitalmars-d-learn
mailing list