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

Add Dune::isNumber trait

parent 1771309b
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -12,4 +12,5 @@ install(FILES
resize.hh
staticmatrixtools.hh
tuplevector.hh
typetraits.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/solvers/common)
#ifndef DUNE_SOLVERS_COMMON_TYPETRAITS_HH
#define DUNE_SOLVERS_COMMON_TYPETRAITS_HH
#include <type_traits>
namespace Dune {
template <typename T>
struct isNumber
: public std::integral_constant<bool, std::is_arithmetic<T>::value> {};
template <typename T>
struct isNumber<std::complex<T>>
: public std::integral_constant<bool, isNumber<T>::value> {};
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment