Skip to content
Snippets Groups Projects
Commit b8506f60 authored by Elias Pipping's avatar Elias Pipping
Browse files

Use std::enable_if<condition, int>::type =0

parent b2edc8fe
No related branches found
No related tags found
No related merge requests found
......@@ -603,10 +603,9 @@ namespace Dune {
}
//! infinity norm (maximum of absolute values of entries)
template <typename vt = value_type>
typename std::enable_if<!has_nan<vt>::value,
typename FieldTraits<vt>::real_type>::type
infinity_norm() const {
template <typename vt = value_type,
typename std::enable_if<!has_nan<vt>::value, int>::type = 0>
typename FieldTraits<vt>::real_type infinity_norm() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::abs;
using std::max;
......@@ -620,10 +619,9 @@ namespace Dune {
}
//! simplified infinity norm (uses Manhattan norm for complex values)
template <typename vt = value_type>
typename std::enable_if<!has_nan<vt>::value,
typename FieldTraits<vt>::real_type>::type
infinity_norm_real() const {
template <typename vt = value_type,
typename std::enable_if<!has_nan<vt>::value, int>::type = 0>
typename FieldTraits<vt>::real_type infinity_norm_real() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::max;
......@@ -636,10 +634,9 @@ namespace Dune {
}
//! infinity norm (maximum of absolute values of entries)
template <typename vt = value_type>
typename std::enable_if<has_nan<vt>::value,
typename FieldTraits<vt>::real_type>::type
infinity_norm() const {
template <typename vt = value_type,
typename std::enable_if<has_nan<vt>::value, int>::type = 0>
typename FieldTraits<vt>::real_type infinity_norm() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::abs;
using std::max;
......@@ -656,10 +653,9 @@ namespace Dune {
}
//! simplified infinity norm (uses Manhattan norm for complex values)
template <typename vt = value_type>
typename std::enable_if<has_nan<vt>::value,
typename FieldTraits<vt>::real_type>::type
infinity_norm_real() const {
template <typename vt = value_type,
typename std::enable_if<has_nan<vt>::value, int>::type = 0>
typename FieldTraits<vt>::real_type infinity_norm_real() const {
using real_type = typename FieldTraits<vt>::real_type;
using std::max;
......
......@@ -527,7 +527,6 @@ namespace Dune
static_assert(std::is_same<I,std::size_t>::value,"Your compiler is broken and does not support checking for arbitrary index types");
};
#endif // defined(DOXYGEN) or HAVE_IS_INDEXABLE_SUPPORT
......
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