diff options
Diffstat (limited to 'libbuild2/functions-builtin.cxx')
-rw-r--r-- | libbuild2/functions-builtin.cxx | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/libbuild2/functions-builtin.cxx b/libbuild2/functions-builtin.cxx index d040ba8..c013c3b 100644 --- a/libbuild2/functions-builtin.cxx +++ b/libbuild2/functions-builtin.cxx @@ -100,25 +100,12 @@ namespace build2 return os.str (); }; - // $sort(<names> [, <flags>]) + // $size(<ints>) // - // Sort names in ascending order. + // Return the number of elements in the sequence. // - // See also type-specific overloads. - // - // The following flags are supported: - // - // dedup - in addition to sorting also remove duplicates - // - f["sort"] += [] (names v, optional<names> fs) - { - sort (v.begin (), v.end ()); - - if (functions_sort_flags (move (fs))) - v.erase (unique (v.begin(), v.end()), v.end ()); - - return v; - }; + f["size"] += [] (int64s v) {return v.size ();}; + f["size"] += [] (uint64s v) {return v.size ();}; // $sort(<ints> [, <flags>]) // |