Skip to content
Snippets Groups Projects
Commit 90d6c5b3 authored by Markus Blatt's avatar Markus Blatt
Browse files

Negate a set.

[[Imported from SVN: r2470]]
parent 071ccb1d
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,23 @@ namespace Dune
static bool contains(const T& item);
};
/**
* @brief The negation of a set.
* An item is contained in the set if and only if it is not
* contained in the negated set.
*/
template<typename S>
class NegateSet
{
public:
typedef typename S::Type Type;
static bool contains(const Type& item)
{
return !S::contains(item);
}
};
/**
* @brief A set combining two other sets.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment