2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Support the slower order stable sequence.unique with an extra flag argument.

[SVN r35522]
This commit is contained in:
Rene Rivera
2006-10-07 22:05:03 +00:00
parent 618a4bfdf2
commit e7657608f4

View File

@@ -149,17 +149,30 @@ rule length ( s * )
return $(result) ;
}
rule unique ( list * )
rule unique ( list * : stable ? )
{
local result ;
local prev ;
for local i in [ SORT $(list) ]
if $(stable)
{
if $(i) != $(prev)
for local f in $(list)
{
result += $(i) ;
if ! $(f) in $(result)
{
result += $(f) ;
}
}
}
else
{
for local i in [ SORT $(list) ]
{
if $(i) != $(prev)
{
result += $(i) ;
}
prev = $(i) ;
}
prev = $(i) ;
}
return $(result) ;
}