November 06 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...implicitly converting `bool` / `char` to `int`, or implicitly converting `int` to `uint` (where negative ints... | |||
November 05 Learn » Re: Negating a short? | |||
|---|---|---|---|
| |||
...cannot implicitly convert expression `-cast(int)s` of type `int` to `short`
For:
import std... | |||
November 05 Learn » Negating a short? | |||
|---|---|---|---|
| |||
...traits(getPointerBitmap, T)[0] < int.sizeof) {
val = cast(T)(-(cast(int)val));
} else {
val = -val... | |||
November 03 Learn » Re: Rhyme and reason for function annotations? | |||
|---|---|---|---|
| |||
...that you want const int. To get that, you need
const(int) foo() { ... }
- Jonathan M... | |||
November 04 Learn » Rhyme and reason for function annotations? | |||
|---|---|---|---|
| |||
...can be annotated
int myfunc(char *arg) pure {
}
Although I find:
pure int myfunc(char... | |||
November 03 DIP Ideas » Re: Allow designated initialization of struct | |||
|---|---|---|---|
| |||
...counter;
} S;
int main()
{
assert(Four == 3);
auto arr[] = { One, Two, Three, Four };
int Four... | |||
November 02 DIP Development » Re: First Draft: Placement New Expression | |||
|---|---|---|---|
| |||
...Unfortunately this compiles: ```d cast(void[])new int[1]; ``` And so would this, without calling... | |||
November 01 General » Re: repls for d | |||
|---|---|---|---|
| |||
...libdparse library, short function forms like `int addOne(int i) => i + 1;` or named function... | |||
November 01 DIP Ideas » Re: Allow designated initialization of struct | |||
|---|---|---|---|
| |||
...try it this way:
```D
struct Other
{
int a;
}
struct Data
{
Other other;
}
void pass... | |||
October 31 Learn » Re: newbie question | |||
|---|---|---|---|
| |||
```d
void f (InputRange!int f) {
writeln(f);
}
auto x = [1,2,3,4,5... | |||
Copyright © 1999-2021 by the D Language Foundation