mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-16 23:07:05 +01:00
HDF5: better complex number support
This commit is contained in:
@ -68,20 +68,21 @@ namespace Grid {
|
||||
return os;
|
||||
}
|
||||
|
||||
// Vector element trait //////////////////////////////////////////////////////
|
||||
// Vector element trait //////////////////////////////////////////////////////
|
||||
template <typename T>
|
||||
struct element
|
||||
{
|
||||
typedef T type;
|
||||
static constexpr bool is_arithmetic = false;
|
||||
static constexpr bool is_number = false;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct element<std::vector<T>>
|
||||
{
|
||||
typedef typename element<T>::type type;
|
||||
static constexpr bool is_arithmetic = std::is_arithmetic<T>::value
|
||||
or element<T>::is_arithmetic;
|
||||
static constexpr bool is_number = std::is_arithmetic<T>::value
|
||||
or is_complex<T>::value
|
||||
or element<T>::is_number;
|
||||
};
|
||||
|
||||
// Vector flatening utility class ////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user