Search

September 07
General »
...Answer: You don't.

```
import std;
void main() {
    writeln(add(3, 4));
}
@nogc int add...
September 06
DIP Ideas »
...std.typecons: t=tuple, T=Tuple;

void main(){
    auto aa=[t(1, 2): t(3...
September 06
DIP Ideas »
...std.typecons: t=tuple, T=Tuple;

void main(){
    // unpack declarations
    auto (a, (b, c)) = t...
September 05
DIP Ideas »
...init, int y) { this(0, y); }
}

void main()
{
    auto s = [ S(42), S(x: 42...
September 05
Learn »
...std.range, std.algorithm,
       std.stdio;

void main()
{
  //import std.array : byPair;/*
  import std.typecons...
September 04
Issues »
...range15788 : iota;

void iota() {}

struct S {}

void main()
{
    S s;
    iota(s, s);
}
---
This gives...
September 04
DIP Ideas »
...always meant to be @safe anyway?
```d
int* x;
void main() @safe{
  auto y = *x;
}
```
September 04
DIP Ideas »
...scope only applies to first indirection

void main() @safe
{
    int x, y;
    scope int[] arr...
September 03
Learn »
...enum Axis { None, X, Y, Z }

void main() {
    Axis[] axes = [Axis.X, Axis.Y, Axis...
September 03
DIP Ideas »
...d
import std;

int* tlsGlobal;

@safe:

void main() {
    tlsGlobal = new int(2);
    assert(*tlsGlobal == 2...
24 25 26 27 28 29 30 31 32 33 34 35
Next ›   Last »