July 21, 2021 General » Re: Enum literals, good? bad? what do you think? | |||
|---|---|---|---|
| |||
...a; import b; foo(something); bar(something); foo and bar take different types that both... | |||
July 21, 2021 General » Re: Enum literals, good? bad? what do you think? | |||
|---|---|---|---|
| |||
...do with nested enums:
```
struct Foo
{
enum Bar { A, B, }
void func () {
assert(A == 0... | |||
July 20, 2021 General » Re: Enum literals, good? bad? what do you think? | |||
|---|---|---|---|
| |||
...i); void bar(Animal a); foo(Animal.Jaguar); // OK foo(Jaguar); // Error bar(Jaguar); // OK... | |||
July 19, 2021 General » What is that "enum function" supposed to be ? | |||
|---|---|---|---|
| |||
...int x) const inout {
return x;
}
auto bar(int x) const {
return x;
}
auto baz... | |||
July 16, 2021 General » Re: RFC: DIP draft for "Compiler-defined Attribute Consistency" | |||
|---|---|---|---|
| |||
...conditional atributes:
void foo()@(Pure!true){ //expand to `pure`
}
void bar()@(Pure!false){ //expand to `()`
}
``` | |||
July 13, 2021 Issues » [Issue 21036] wrong code for non-pod types when compiled function with variadic static array | |||
|---|---|---|---|
| |||
...explicit array literal, i.e.:
void main()
{
bar([S.init, S.init]);
}
In that case... | |||
July 12, 2021 Issues » [Issue 22119] New: [Functions] Function Overloading clarity for int[] and strings | |||
|---|---|---|---|
| |||
...struct bar{
int i;
}
struct foo{
bar i; alias i this;
}
void foobar(bar[] yo... | |||
July 07, 2021 Learn » Re: Template arg deduction | |||
|---|---|---|---|
| |||
...T){
class bar{
T t;
}
}
void func(alias F : foo!T, T)(F.bar f... | |||
July 07, 2021 Learn » Re: Template arg deduction | |||
|---|---|---|---|
| |||
...need to repeat foo!(int).bar :)
{
}
int main()
{
foo!(int).bar fi;//brackets added, now... | |||
July 07, 2021 Learn » Template arg deduction | |||
|---|---|---|---|
| |||
...argument types !()(bar), candidates are: temptest.d(10): func(T)(foo!T.bar f) I... | |||
Copyright © 1999-2021 by the D Language Foundation