August 07, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...struct Aligned(T, size_t alignment) if (alignment >= T.alignof)
{
align(alignment) T payload;
alias... | |||
August 07, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...really is 16, then why isn't the size of it 64 as well? It... | |||
August 06, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...struct Aligned(T, size_t alignment)
if (alignment >= T.alignof)
{
align(alignment) T payload;
alias... | |||
August 06, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...T payload;
//invariant(payload.length <= maxLength);
//this(T[] slice) { payload = slice; }
//T opIndex(size_t... | |||
August 06, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...alignment of the array as a whole. T -- It is the quality rather than the... | |||
August 06, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...arr, 1000);// fails :( } ``` Of course, this won't work if you want to resize the... | |||
August 06, 2021 General » Re: Is `alias this` a mistake? | |||
|---|---|---|---|
| |||
...program with a stack size of 8MiB ? As...on program termination doesn't matter. In practice... | |||
August 06, 2021 Learn » Re: Setting a hard limit on slice size, is this possible? | |||
|---|---|---|---|
| |||
...MySlice(T, size_t maxLength)
{
private T[] payload;
invariant(payload.length <= maxLength);
this(T[] slice... | |||
August 05, 2021 General » Re: Is `alias this` a mistake? | |||
|---|---|---|---|
| |||
...instead. T -- Just because you can, doesn't...of which is, the size of a variable... | |||
August 03, 2021 General » Re: Do you use D's GC? | |||
|---|---|---|---|
| |||
...needed):
```d
void ensureHasRoom(ref ubyte[] buffer, size_t length) {
bool shouldAssume = buffer.length > length... | |||
Copyright © 1999-2021 by the D Language Foundation