Skip to content
Snippets Groups Projects
Commit f54750f5 authored by Timo Koch's avatar Timo Koch
Browse files

[typetraits] Derive AlwaysTrue/False from std::true/false_type

parent c677329f
No related branches found
No related tags found
2 merge requests!976Merge branch 'cleenup/deprecate-dune-disj-conj-neg-typetraits' into 'master',!971Deprecate Dune::Std::to_true_type and to_false_type
......@@ -121,10 +121,7 @@ namespace Dune
type of T is known, that is, until Traits<T> is instantiated.
*/
template<typename T>
struct AlwaysFalse {
//! always a false value
static const bool value = false;
};
struct AlwaysFalse : public std::false_type {};
/**
\brief template which always yields a true value
......@@ -134,10 +131,7 @@ namespace Dune
\note This class exists mostly for consistency with AlwaysFalse.
*/
template<typename T>
struct AlwaysTrue {
//! always a true value
static const bool value = true;
};
struct AlwaysTrue : public std::true_type {};
//! \brief Whether this type acts as a scalar in the context of
//! (hierarchically blocked) containers
......
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