www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17995] New: template NoDuplicates(TList...) bug.

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 puremagic.com
          Reporter: shove 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'.

--
Nov 19