Skip to content
Snippets Groups Projects
Commit 9d5d5666 authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

call `abort()` instead of `assert(false)`

`abort()` will always abort the program instead of silently ignoring
the error when built with `-DNDEBUG`
parent b4ce44b7
No related branches found
No related tags found
1 merge request!151call `abort()` instead of `assert(false)`
......@@ -76,14 +76,15 @@ namespace Dune
template<class T1, class T2>
void dot (const T1& x, const T1& y, T2& result) const
{
assert(false && "this function should never be called");
// This function should never be called
std::abort();
}
template<class T1>
typename FieldTraits<typename T1::field_type>::real_type norm (const T1& x) const
{
assert(false && "this function should never be called");
return typename FieldTraits<typename T1::field_type>::real_type(0);
// This function should never be called
std::abort();
}
template<class T>
......
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