May 11, 2022 Learn » Re: What are (were) the most difficult parts of D? | |||
|---|---|---|---|
| |||
...compile-time error:
```d
@safe:
auto map(alias fun, T)(T[] arr)
{
auto result = arr... | |||
May 11, 2022 Learn » Re: Trait for "can be instantiated"? | |||
|---|---|---|---|
| |||
...void main()
{
alias toks = getSymbolsByUDA!(mixin(__MODULE__), Token);
static foreach (t; toks)
{{
alias U = getUDAs... | |||
May 10, 2022 General » Re: enum confusion | |||
|---|---|---|---|
| |||
...foo.bar)).writefln!"4. %s"; // by alias "5. ".writeln(&foo); (&foo).writefln... | |||
May 10, 2022 Learn » Re: Parameters of overloaded templated function | |||
|---|---|---|---|
| |||
...Idk what's happening there Try ```d alias getParams = Parameters!(typed);//add the parenthesis ``` _Maybe... | |||
May 10, 2022 Learn » Type Parameter Deduction | |||
|---|---|---|---|
| |||
...contract programming or otherwise throwing errors. ```d alias ir = inclusiveRange; auto inclusiveRange(T = int)(T... | |||
May 10, 2022 Learn » Re: Trait for "can be instantiated"? | |||
|---|---|---|---|
| |||
...also gives an error!
```d
void main()
{
alias T = char;
import std.traits;
foreach(useableType... | |||
May 10, 2022 Learn » Re: Parameters of overloaded templated function | |||
|---|---|---|---|
| |||
...try
```d
template getParams(alias overload) {
static if (__traits(isTemplate, overload)) {
//alias typed = overload!int... | |||
May 10, 2022 Learn » Parameters of overloaded templated function | |||
|---|---|---|---|
| |||
...overload:
```d
template getParams(alias overload) {
static if (__traits(isTemplate, overload)) {
alias typed = overload!int... | |||
May 09, 2022 Learn » Trait for "can be instantiated"? | |||
|---|---|---|---|
| |||
...have a struct template that takes an alias parameter and I'm trying to distinguish... | |||
May 08, 2022 Learn » Re: Compile delegate with enum into proper function? | |||
|---|---|---|---|
| |||
...return x + a;
}
enum int a = 2;
alias foo = partial!(foo, a);
void main() {
int... | |||
Copyright © 1999-2021 by the D Language Foundation