| Thread overview |
|---|
September 24, 2015 Deduplicating Template Parameter List of std.variant.Algebraic | ||||
|---|---|---|---|---|
| ||||
I just noticed that Algebraic doesn't deduplicate its types before construction because this compiles:
import std.variant : Algebraic;
auto x = Algebraic!(int, int)(5);
Is this really sane?
| ||||
September 25, 2015 Re: Deduplicating Template Parameter List of std.variant.Algebraic | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Thursday, 24 September 2015 at 20:20:42 UTC, Nordlöw wrote:
> I just noticed that Algebraic doesn't deduplicate its types before construction because this compiles:
>
> import std.variant : Algebraic;
> auto x = Algebraic!(int, int)(5);
>
> Is this really sane?
How can a template parameter list be deduplicated or sorted?
| |||
September 25, 2015 Re: Deduplicating Template Parameter List of std.variant.Algebraic | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Friday, 25 September 2015 at 16:08:41 UTC, Nordlöw wrote: > How can a template parameter list be deduplicated or sorted? You can use http://dlang.org/phobos/std_meta.html#.NoDuplicates. I imagine this was an oversight in the implementation of Algebraic. | |||
September 25, 2015 Re: Deduplicating Template Parameter List of std.variant.Algebraic | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Meta | On Friday, 25 September 2015 at 18:11:51 UTC, Meta wrote:
> You can use http://dlang.org/phobos/std_meta.html#.NoDuplicates. I imagine this was an oversight in the implementation of Algebraic.
Thanks
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply