Search

6 days ago
Learn »
...thing. They behave just like any other struct, and I've never seen any problems...
6 days ago
Learn »
Ah... very nice. I completely missed that "alias this" could be used with a function...
6 days ago
Learn »
On 12/2/24 12:27 PM, Josh Holtrop wrote:

>>   alias get this;
>
> If I...
6 days ago
Learn »
...so that you can visualize it:

```d
struct FixedStr(size_t capacity)
{
  char[capacity] data...
6 days ago
Learn »
If I use `alias this` I don't know how I can get `volatileLoad()` to...
6 days ago
Learn »
...this' may help:

  https://dlang.org/spec/struct.html#alias-this

All you need to...
6 days ago
Learn »
...of size being 1, today this passes:

struct S {}

void main() {
    S[2] ses;
    assert...
6 days ago
Learn »
...a `Volatile(T)` struct template:

```d
module myproj.volatile;

import core.volatile;

struct Volatile(T...
6 days ago
Learn »
I've noticed that empty struct are always at least a size of 1, see...
6 days ago
Learn »
...import core.atomic;
import core.sync.mutex;

struct GlobalCounter
{
    private Mutex mutex;
    private shared int...
1 2 3 4 5 6 7 8
Next ›   Last »