September 19 Issues » [Issue 24772] New: Casting class references to void* should be @safe | |||
|---|---|---|---|
| |||
...I {}
C c;
I i;
@safe void main()
{
auto cp = cast(void*)c; // Error: cast... | |||
September 18 General » Re: Did you know; we need this operator! | |||
|---|---|---|---|
| |||
...Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
};
void main()
{
auto jsonStr = `{
"Pazar": Sunday,
"Pazartesi": Monday,
"Salı... | |||
September 16 General » Re: Did you know; we need this operator! | |||
|---|---|---|---|
| |||
...Thursday, Friday, Saturday
};
}
using namespace Days;//*/
int main()
{
Day today = Sunday;
cout << "Hello " << today;
return... | |||
September 14 General » Re: Did you know; we need this operator! | |||
|---|---|---|---|
| |||
...an expression, not just a statement:
```d
void main()
{
auto days = with (Days) [
"Pazar" : Sunday,
// ...
];
}
``` | |||
September 13 General » Re: Standard way to supply hints to branches | |||
|---|---|---|---|
| |||
...the main code path. In most cases, the "hot path" will be the main code... | |||
September 13 General » Did you know; we need this operator! | |||
|---|---|---|---|
| |||
...example below!
```d
alias DaysoftheWeekinEnglish D;
void main()
{
// with (Days)
auto days = [
"Pazar" : D.Sunday... | |||
September 13 Issues » [Issue 24754] cannot take address of a member array in a ref foreach | |||
|---|---|---|---|
| |||
...ref`, although, spec-wise it should:
```
void main() @safe
{
foreach(e; new int[1])
int... | |||
September 13 Issues » [Issue 24754] cannot take address of a member array in a ref foreach | |||
|---|---|---|---|
| |||
...dkorpel@live.nl> ---
Reduces to:
```D
void main() @safe
{
foreach(ref e; new int[1... | |||
September 12 Issues » [Issue 24754] cannot take address of a member array in a ref foreach | |||
|---|---|---|---|
| |||
...0 .. foo.length)
f = &foo[i];
}
}
void main()
{
Foo foo;
foo.foobar();
}
```
It uses pointers... | |||
September 12 DIP Development » Re: First Draft: Member of Operator | |||
|---|---|---|---|
| |||
...colon next to each other:
```d
void main()
{
with (Days)
{
auto days =
... | |||
Copyright © 1999-2021 by the D Language Foundation