isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
TypeTraits.h
1 #pragma once
2 
3 #include <complex>
4 #include <type_traits>
5 
6 namespace isce3 {
7 
8 template<class> struct is_floating_or_complex : public std::false_type {};
9 template<> struct is_floating_or_complex<float> : public std::true_type {};
10 template<> struct is_floating_or_complex<double> : public std::true_type {};
11 template<> struct is_floating_or_complex<std::complex<float>> : public std::true_type {};
12 template<> struct is_floating_or_complex<std::complex<double>> : public std::true_type {};
13 // (we currently don't allow long-doubles)
14 
15 template<class T>
16 inline constexpr bool is_floating_or_complex_v = is_floating_or_complex<T>::value;
17 
18 template<class T> using enable_if_floating_or_complex =
19  std::enable_if<is_floating_or_complex_v<T>, T>;
20 template<class T> using enable_if_floating_or_complex_t =
21  typename enable_if_floating_or_complex<T>::type;
22 
23 } // namespace isce3
Definition: TypeTraits.h:8

Generated for ISCE3.0 by doxygen 1.8.5.