The task makes use of the C++ STL algorithms to do all the work. The set_difference() algorithm produces a sequence of elements that are members of its first, but not its second, input sequence [2].
It should be noted that CalIndex is defined as list<CcfConstituent *>.