[Issue 17995] New: template NoDuplicates(TList...) bug.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 20 06:31:09 UTC 2017
https://issues.dlang.org/show_bug.cgi?id=17995
Issue ID: 17995
Summary: template NoDuplicates(TList...) bug.
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: shove at 163.com
Phobos version: 2.077.0
file: std/meta.d
line: 486
template NoDuplicates(TList...)
{
...
static if (TList.length > 500)
{
enum steps = 16;
alias first = NoDuplicates!(TList[0 .. steps]);
alias NoDuplicates = NoDuplicates!(EraseAllN!(first.length, first,
TList[steps..$]));
}
...
}
When processing step by step here, forget to process 'first'.
--
More information about the Digitalmars-d-bugs
mailing list