On Tuesday, 18 June 2019 at 12:26:14 UTC, lili wrote:
Hi guys:
Is the Dlang fix-length array alloc on stack? when a test
writeln([1]).sizeof //16
writeln([2]).sizeof //16
Why, What is the fix-length array memory layout.
You are quite confused...
[...] is an array literal, not a
On Wednesday, 19 June 2019 at 12:53:05 UTC, Cym13 wrote:
Did you import it properly?
```
void main() {
import core.stdcpp.array;
auto a = array!(int, 4)();
}
```
compiles and runs without issue for me. You'll have to show
your code if you want people to help you there.
On Wednesday, 19 June 2019 at 05:27:12 UTC, lili wrote:
On Tuesday, 18 June 2019 at 17:29:49 UTC, Cym13 wrote:
On Tuesday, 18 June 2019 at 17:25:42 UTC, Cym13 wrote:
On Tuesday, 18 June 2019 at 13:05:03 UTC, lili wrote:
On Tuesday, 18 June 2019 at 12:39:45 UTC, Dennis wrote:
[...]
Thanks a l
On Tuesday, 18 June 2019 at 17:29:49 UTC, Cym13 wrote:
On Tuesday, 18 June 2019 at 17:25:42 UTC, Cym13 wrote:
On Tuesday, 18 June 2019 at 13:05:03 UTC, lili wrote:
On Tuesday, 18 June 2019 at 12:39:45 UTC, Dennis wrote:
[...]
Thanks a lot, where is a core.stdcpp.array , How to user it?
I test
On Tuesday, 18 June 2019 at 17:25:42 UTC, Cym13 wrote:
On Tuesday, 18 June 2019 at 13:05:03 UTC, lili wrote:
On Tuesday, 18 June 2019 at 12:39:45 UTC, Dennis wrote:
[...]
Thanks a lot, where is a core.stdcpp.array , How to user it?
I test but get a error
```
auto aa = array!(int, 4); //erro
On Tuesday, 18 June 2019 at 13:05:03 UTC, lili wrote:
On Tuesday, 18 June 2019 at 12:39:45 UTC, Dennis wrote:
On Tuesday, 18 June 2019 at 12:26:14 UTC, lili wrote:
[...]
I'm assuming you mean writeln([1].sizeof).
An array literal is a slice of a dynamic array (which is
length + pointer,
On Tuesday, 18 June 2019 at 12:39:45 UTC, Dennis wrote:
On Tuesday, 18 June 2019 at 12:26:14 UTC, lili wrote:
Hi guys:
Is the Dlang fix-length array alloc on stack? when a test
writeln([1]).sizeof //16
writeln([2]).sizeof //16
Why, What is the fix-length array memory layout.
I'
On Tue, Jun 18, 2019 at 2:30 PM lili via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> Hi guys:
> Is the Dlang fix-length array alloc on stack? when a test
> writeln([1]).sizeof //16
> writeln([2]).sizeof //16
> Why, What is the fix-length array memory layou
On Tuesday, 18 June 2019 at 12:26:14 UTC, lili wrote:
Hi guys:
Is the Dlang fix-length array alloc on stack? when a test
writeln([1]).sizeof //16
writeln([2]).sizeof //16
Why, What is the fix-length array memory layout.
I'm assuming you mean writeln([1].sizeof).
An array literal
import std.stdio;
import std.array : staticArray;
void main() {
writeln([1].staticArray.sizeof); //4
writeln([2,5].staticArray.sizeof); //8
}
On Tue, Jun 18, 2019 at 2:30 PM lili via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:
> Hi guys:
> Is the Dlang fix-length
Hi guys:
Is the Dlang fix-length array alloc on stack? when a test
writeln([1]).sizeof //16
writeln([2]).sizeof //16
Why, What is the fix-length array memory layout.
11 matches
Mail list logo