November 25 Learn » only parameters or stack-based variables can be `inout` | |||
|---|---|---|---|
| |||
...enum E
{
One,
Two
}
// OK:
inout(int) fun(inout(int) i)
{
writeln(i.to!string... | |||
November 25 Issues » [Issue 24879] Unexpected sign extension after shifting a ubyte and promoting to ulong | |||
|---|---|---|---|
| |||
...nl> --- `bytes[4] << 24` gets promoted to int, and sign extended when or'd with... | |||
November 24 Issues » [Issue 21446] Cannot initialize a static array from a struct field of dynamic array type at compile time | |||
|---|---|---|---|
| |||
...Comment #1 from Nick Treleaven <nick@geany.org> --- Workaround - use `[]`: int[1] a = s.a[]; -- | |||
November 24 Issues » [Issue 24876] New: Undocumented cast from slice to static array | |||
|---|---|---|---|
| |||
...nick@geany.org
E.g.:
void f(int[] b)
{
char[4] a;
a = cast(char... | |||
November 23 Learn » Re: Using a tuple as a function parameter | |||
|---|---|---|---|
| |||
...this?
```d
string getOrZeroth(string[3] tup, int i) pure {
return tup[i] == "" ? tup[0... | |||
November 23 Issues » [Issue 24874] New: Copying, assigning to, and destroying a struct with a union that contains a non-POD struct should be @system | |||
|---|---|---|---|
| |||
...foo = foo2;
}
struct Foo
{
union
{
Bar b;
int i;
}
}
struct Bar
{
this(this) {}
void opAssign... | |||
November 22 Issues » [Issue 24872] New: Assigning non-copyable value to array has no effect | |||
|---|---|---|---|
| |||
...an assertion failure when run:
---
struct S
{
int n;
@disable this(this);
}
void main()
{
import... | |||
November 22 Learn » Re: Using a tuple as a function parameter | |||
|---|---|---|---|
| |||
...string getOrZeroth(Tuple!(string, string, string) tup, int i)
{
switch (i)
{
static foreach (j; 0... | |||
November 22 Learn » Re: Using a tuple as a function parameter | |||
|---|---|---|---|
| |||
...string getOrZerothT(Tuple!(string, string, string) tup, int i)() pure {
//AliasSeq!(a,b,c) = tup... | |||
November 22 Learn » Re: Using a tuple as a function parameter | |||
|---|---|---|---|
| |||
...a template value parameter instead:
```
string getOrZeroth(int i)(Tuple!(string, string, string) tup)
{
return... | |||
Copyright © 1999-2021 by the D Language Foundation