Search

August 07, 2021
Learn »
...struct Aligned(T, size_t alignment) if (alignment >= T.alignof)
    {
       align(alignment) T payload;
       alias...
August 07, 2021
Learn »
...really is 16, then why isn't the size of it 64 as well? It...
August 06, 2021
Learn »
...struct Aligned(T, size_t alignment)
    if (alignment >= T.alignof)
{
    align(alignment) T payload;
    alias...
August 06, 2021
Learn »
...T payload;

    //invariant(payload.length <= maxLength);

    //this(T[] slice) { payload = slice; }

    //T opIndex(size_t...
August 06, 2021
Learn »
...alignment of the array as a whole.


T

-- 
It is the quality rather than the...
August 06, 2021
Learn »
...arr, 1000);// fails :(
}
```
Of course, this won't work if you want to resize the...
August 06, 2021
General »
...program with a stack size of 8MiB ?
As...on program termination doesn't matter.
In practice...
August 06, 2021
Learn »
...MySlice(T, size_t maxLength)
{
    private T[] payload;

    invariant(payload.length <= maxLength);

    this(T[] slice...
August 05, 2021
General »
...instead.


T

-- 
Just because you can, doesn't...of which is, the size of a variable...
August 03, 2021
General »
...needed):

```d
void ensureHasRoom(ref ubyte[] buffer, size_t length) {
  bool shouldAssume = buffer.length > length...
140 141 142 143 144 145 146 147 148 149 150
Next ›   Last »