Does anybody recognize the error
```
Attribute 'nocapture' does not apply to function return values
%12 = call noalias nocapture align 8 ptr @_D3xxx(ptr nonnull
%10, { i64, ptr } %11) #2, !dbg !7978
Attribute 'nocapture' does not apply to function return values
ptr @_D3xyz1
Attribute
On Saturday, 30 March 2024 at 03:25:02 UTC, matheus wrote:
Interesting!
Matheus.
Yes, it's just a small modification.
On Saturday, 30 March 2024 at 05:01:32 UTC, harakim wrote:
@D Language Foundation - This is a HUGE selling point. I had to
use cups the other day and I just copied some code from a d
file and linked the library. It was so easy I was suspicious
but it worked. Using C from D is pretty much as
On Saturday, 30 March 2024 at 21:45:34 UTC, Nick Treleaven wrote:
On Saturday, 30 March 2024 at 21:25:45 UTC, Carl Sturtivant
wrote:
OK, so how can I get them? Am I forced to take that string and
parse it with CTFE?
Lookup the source of ParameterIdentifierTuple and change
On Saturday, 30 March 2024 at 21:51:34 UTC, Nick Treleaven wrote:
On Saturday, 30 March 2024 at 21:45:34 UTC, Nick Treleaven
wrote:
On Saturday, 30 March 2024 at 21:25:45 UTC, Carl Sturtivant
wrote:
OK, so how can I get them? Am I forced to take that string
and parse it with CTFE?
Lookup the
Using the
[ParameterIdentifierTuple](https://dlang.org/phobos/std_traits.html#ParameterIdentifierTuple) example just there, with one more step stops working. Details:
```D
import std.traits;
int foo(int num, string name, int);
static assert([ParameterIdentifierTuple!foo] == ["num", "name",
On Saturday, 30 March 2024 at 19:23:07 UTC, Carl Sturtivant wrote:
$ dmd -c bug1.d
int(int num, string name, int)
["", "", ""]
bug1.d(9): Error: static assert: "wrong!"
```
Please explain. How do I get the names of the identifiers out
of a parameter list at compile time reliably?
Although
On Saturday, 30 March 2024 at 21:25:45 UTC, Carl Sturtivant wrote:
OK, so how can I get them? Am I forced to take that string and
parse it with CTFE?
Lookup the source of ParameterIdentifierTuple and change
`FunctionTypeOf!func` to just `func` inside the first `static if`.
On Saturday, 30 March 2024 at 21:07:35 UTC, Nick Treleaven wrote:
Although `.stringof` on a function type does include the
parameter names, the names are not really part of the type -
see:
https://github.com/dlang/phobos/pull/3620#issuecomment-288469685
Perhaps `ParameterIdentifierTuple`
On Saturday, 30 March 2024 at 21:07:35 UTC, Nick Treleaven wrote:
On Saturday, 30 March 2024 at 19:23:07 UTC, Carl Sturtivant
wrote:
$ dmd -c bug1.d
int(int num, string name, int)
["", "", ""]
bug1.d(9): Error: static assert: "wrong!"
```
Please explain. How do I get the names of the
On Saturday, 30 March 2024 at 22:37:53 UTC, Carl Sturtivant wrote:
Incidentally, I tried
```D
extern typeof(foo) func;
```
to say that func was an actual function (`extern` so defined
elsewhere) whose type was the type of the function `int foo(int
num, string name, int);` so I can then use
11 matches
Mail list logo