April 22, 2022 Learn » Re: Understanding alias template parameters | |||
|---|---|---|---|
| |||
...typeof(this)(r.save,f); }
}
auto myMap(alias f, R)(R r) {
static if(__traits... | |||
April 22, 2022 Learn » Re: How to get an IP address from network interfaces | |||
|---|---|---|---|
| |||
...ifr_ifru_ ifr_ifru;
// NOTE: alias will not work : alias ifr_ifrn.ifrn_name ifr... | |||
April 21, 2022 Learn » Re: Understanding alias template parameters | |||
|---|---|---|---|
| |||
...the alias to your struct as a template parameter, e.g.: struct MapResult(alias f... | |||
April 21, 2022 Learn » Re: Understanding alias template parameters | |||
|---|---|---|---|
| |||
...writeln;
// with only struct:
struct MapResult(alias range, alias f) {
auto empty() { return range.empty... | |||
April 21, 2022 Learn » Re: Understanding alias template parameters | |||
|---|---|---|---|
| |||
When you write a lambda without type annotations, like `x => 2*x`, the compiler interprets... | |||
April 21, 2022 Learn » Re: Understanding alias template parameters | |||
|---|---|---|---|
| |||
...thing to do is to stay with alias template parameters for MapResult as well. I... | |||
April 21, 2022 Learn » Understanding alias template parameters | |||
|---|---|---|---|
| |||
...typeof(this)(r.save,f); }
}
auto myMap(alias f, R)(R r) {
return MapResult!(R... | |||
April 21, 2022 Genel » Re: Sequences Processing | |||
|---|---|---|---|
| |||
...isD[8]: 8 ]; auto app = appender!string(); alias f = void delegate (string key, int value... | |||
April 21, 2022 Learn » Re: How to get an IP address from network interfaces | |||
|---|---|---|---|
| |||
...ifr_ifru_ ifr_ifru;
// NOTE: alias will not work : alias ifr_ifrn.ifrn_name ifr... | |||
April 20, 2022 Learn » Lambda Tuple with Map Reduce | |||
|---|---|---|---|
| |||
...5); alias fun1 = (type a) => a * a; alias fun2 = (type a) => a * 2; alias fun3... | |||
Copyright © 1999-2021 by the D Language Foundation