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

Added set that contains everything.

[[Imported from SVN: r5607]]
parent 43e409e7
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,23 @@ namespace Dune ...@@ -34,6 +34,23 @@ namespace Dune
static bool contains(const Type& attribute); static bool contains(const Type& attribute);
}; };
/**
* @brief An set containing everything.
*/
template<typename TA>
class AllSet
{
public:
/**
* @brief The POD type the set holds.
*/
typedef TA Type;
/**
* @brief Always returns false.
*/
static bool contains(const Type& attribute);
};
/** /**
* @brief A set consisting only of one item. * @brief A set consisting only of one item.
*/ */
...@@ -100,6 +117,12 @@ namespace Dune ...@@ -100,6 +117,12 @@ namespace Dune
return false; return false;
} }
template<typename TA>
inline bool AllSet<TA>::contains(const TA& attribute)
{
return true;
}
template<typename TA,int i> template<typename TA,int i>
inline bool EnumItem<TA,i>::contains(const TA& item) inline bool EnumItem<TA,i>::contains(const TA& item)
{ {
......
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