September 07 General » Re: Discussion about deprecating @nogc and workarounds | |||
|---|---|---|---|
| |||
...Answer: You don't.
```
import std;
void main() {
writeln(add(3, 4));
}
@nogc int add... | |||
September 06 DIP Ideas » Re: Unpacking syntax | |||
|---|---|---|---|
| |||
...std.typecons: t=tuple, T=Tuple;
void main(){
auto aa=[t(1, 2): t(3... | |||
September 06 DIP Ideas » Unpacking syntax | |||
|---|---|---|---|
| |||
...std.typecons: t=tuple, T=Tuple;
void main(){
// unpack declarations
auto (a, (b, c)) = t... | |||
September 05 DIP Ideas » Re: Allow struct constructors with all parameters optional | |||
|---|---|---|---|
| |||
...init, int y) { this(0, y); }
}
void main()
{
auto s = [ S(42), S(x: 42... | |||
September 05 Learn » Re: Tuple List | |||
|---|---|---|---|
| |||
...std.range, std.algorithm,
std.stdio;
void main()
{
//import std.array : byPair;/*
import std.typecons... | |||
September 04 Issues » [Issue 24744] New: List candidates when no overloads match from different modules | |||
|---|---|---|---|
| |||
...range15788 : iota;
void iota() {}
struct S {}
void main()
{
S s;
iota(s, s);
}
---
This gives... | |||
September 04 DIP Ideas » Re: Escape Analysis & Owner Escape Analysis | |||
|---|---|---|---|
| |||
...always meant to be @safe anyway?
```d
int* x;
void main() @safe{
auto y = *x;
}
``` | |||
September 04 DIP Ideas » Re: Escape Analysis & Owner Escape Analysis | |||
|---|---|---|---|
| |||
...scope only applies to first indirection
void main() @safe
{
int x, y;
scope int[] arr... | |||
September 03 Learn » std.random.uniform failing | |||
|---|---|---|---|
| |||
...enum Axis { None, X, Y, Z }
void main() {
Axis[] axes = [Axis.X, Axis.Y, Axis... | |||
September 03 DIP Ideas » Re: Escape Analysis & Owner Escape Analysis | |||
|---|---|---|---|
| |||
...d
import std;
int* tlsGlobal;
@safe:
void main() {
tlsGlobal = new int(2);
assert(*tlsGlobal == 2... | |||
Copyright © 1999-2021 by the D Language Foundation