MCPcopy Create free account
hub / github.com/boostorg/build / set_difference

Function set_difference

v2/engine/modules/set.c:20–34  ·  view source on GitHub ↗

local result = ; local element ; for element in $(B) { if ! ( $(element) in $(A) ) { result += $(element) ; } } return $(result) ; */

Source from the content-addressed store, hash-verified

18 return $(result) ;
19*/
20LIST *set_difference( FRAME *frame, int flags )
21{
22
23 LIST* b = lol_get( frame->args, 0 );
24 LIST* a = lol_get( frame->args, 1 );
25
26 LIST* result = L0;
27 LISTITER iter = list_begin( b ), end = list_end( b );
28 for( ; iter != end; iter = list_next( iter ) )
29 {
30 if (!list_in(a, list_item(iter)))
31 result = list_push_back(result, object_copy(list_item(iter)));
32 }
33 return result;
34}
35
36void init_set()
37{

Callers

nothing calls this directly

Calls 6

lol_getFunction · 0.85
list_beginFunction · 0.85
list_endFunction · 0.85
list_inFunction · 0.85
list_push_backFunction · 0.85
object_copyFunction · 0.85

Tested by

no test coverage detected