On 11/5/21 5:43 PM, Andrey Zherikov wrote:
In case others want to work, here are the modules that need to be imported:
import std.algorithm;
import std.range;
import std.stdio;
> struct A {}
> struct B
> {
> A[] ar = [A.init];
> size_t[] idx = [0];
I don't know why but those initial
On Friday, 5 November 2021 at 20:13:02 UTC, Andrey Zherikov wrote:
On Friday, 5 November 2021 at 19:49:50 UTC, Ali Çehreli wrote:
Indexes are typed as size_t, which is ulong for 64-bit and
uint for 32-bit. If idx elements were indeed indexes, it
should have been typed as size_t:
size_t[] idx
On Friday, 5 November 2021 at 19:49:50 UTC, Ali Çehreli wrote:
Indexes are typed as size_t, which is ulong for 64-bit and uint
for 32-bit. If idx elements were indeed indexes, it should have
been typed as size_t:
size_t[] idx = [1,3,4]; // <-- Here
Ah, good point. Thanks!
On 11/5/21 11:44 AM, kdevel wrote:
> On Thursday, 4 November 2021 at 11:26:30 UTC, Andrey Zherikov wrote:
>> I have the following code example:
>
> [...]
>
>> A[5] a;
>> ulong[] idx = [1,3,4];
>
> [...]
>
>> return idx.map!(_ => a[_]);
>
> How can one make the type of idx's elements portable (
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to Windows
from a Linux dev machine ?
https://forum.dlang.org/thread/qnsbjdamttlklurnp...@forum.dlang.org
On Friday, 5 November 2021 at 18:23:29 UTC, Luis wrote:
On Friday, 5 November 2021 at 18:13:03 UTC, Imperatorn wrote:
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to
Windows from a Linux dev machine ?
Wine 😎
Ideally should be s
On Thursday, 4 November 2021 at 11:26:30 UTC, Andrey Zherikov
wrote:
I have the following code example:
[...]
A[5] a;
ulong[] idx = [1,3,4];
[...]
return idx.map!(_ => a[_]);
How can one make the type of idx's elements portable (compile
with -m32 to see what the problem is)? This s
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to Windows
from a Linux dev machine ?
I don't know if it is possible with dmd. But with LDC you can use
mtriple.
https://wiki.dlang.org/Cross-compiling_with_LDC
On Friday, 5 November 2021 at 18:13:03 UTC, Imperatorn wrote:
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to
Windows from a Linux dev machine ?
Wine 😎
Ideally should be something like `dub build -target=x64-windows`
or somethi
On Friday, 5 November 2021 at 06:19:16 UTC, Li30U wrote:
...e.g.
```d
// ...
mixin ("ReturnType /*...snip...*/ " ~ member ~ "()(Parameters!
/*...snip...*/
```
Note the `()` before parameter list. This would make your member
function a function template, for which attributes will be
inferred
There is a obvious way to crosscompile a dub project to Windows
from a Linux dev machine ?
On Friday, 5 November 2021 at 18:11:35 UTC, Luis wrote:
There is a obvious way to crosscompile a dub project to Windows
from a Linux dev machine ?
Wine 😎
On Friday, 5 November 2021 at 06:19:16 UTC, Li30U wrote:
I am creating a templated object that is a storehouse for a
heap object and executes their methods and returns an array of
results. With the help of a template, I want to achieve this,
but I want to assign the same attributes to the funct
13 matches
Mail list logo