diff --git a/src/blackmisc/identifierlist.cpp b/src/blackmisc/identifierlist.cpp index 984151a44..8a345b236 100644 --- a/src/blackmisc/identifierlist.cpp +++ b/src/blackmisc/identifierlist.cpp @@ -17,4 +17,9 @@ namespace BlackMisc CIdentifierList::CIdentifierList(const CSequence &other) : CSequence(other) { } + + bool CIdentifierList::containsAnyNotIn(const CIdentifierList &other) const + { + return containsBy([&other](const CIdentifier &id) { return ! other.contains(id); }); + } } // namespace diff --git a/src/blackmisc/identifierlist.h b/src/blackmisc/identifierlist.h index 3984fd00c..1ab02a28e 100644 --- a/src/blackmisc/identifierlist.h +++ b/src/blackmisc/identifierlist.h @@ -36,6 +36,9 @@ namespace BlackMisc //! Construct from a base class object. CIdentifierList(const CSequence &other); + + //! This list contains an identifier which is not contained in other. + bool containsAnyNotIn(const CIdentifierList &other) const; }; } //namespace