Skip to content
Snippets Groups Projects
Commit ca4f47fb authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[static_assert.hh] Add a class AlwaysTrue for consistency with AlwaysFalse.

I'm actually going to need this class in PDELab.  Of course, I could just use
!AlwaysFalse<T>::value instead, but that makes the code even harder to
understand.

[[Imported from SVN: r6023]]
parent 2f272b99
Branches
Tags
No related merge requests found
......@@ -157,6 +157,19 @@ namespace Dune {
//! always a false value
static const bool value = false;
};
//! template which always yields a true value
/**
* \tparam T Some type. It sould be a type expression involving template
* parameters of the class or function using AlwaysTrue.
*
* \note This class exists mostly for consistency with AlwaysFalse.
*/
template<typename T>
struct AlwaysTrue {
//! always a true value
static const bool value = true;
};
} // namespace Dune
/* @} */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment