npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
ProperDblFromCmpl.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_PROPERDBLFROMCMPL_HH_
2 #define NPSTAT_PROPERDBLFROMCMPL_HH_
3 
4 /*!
5 // \file ProperDblFromCmpl.hh
6 //
7 // \brief Compile-time deduction of the underlying floating point type from
8 // the given complex type
9 //
10 // Author: I. Volobouev
11 //
12 // January 2012
13 */
14 
15 #include <complex>
16 
17 namespace npstat {
18  template <class T>
20  {
21  typedef double type;
22  };
23 
24  template <class T>
25  struct ProperDblFromCmpl<std::complex<T> >
26  {
27  typedef T type;
28  };
29 
30  template <class T>
31  struct ProperDblFromCmpl<const std::complex<T> >
32  {
33  typedef T type;
34  };
35 
36  template <class T>
37  struct ProperDblFromCmpl<volatile std::complex<T> >
38  {
39  typedef T type;
40  };
41 
42  template <class T>
43  struct ProperDblFromCmpl<const volatile std::complex<T> >
44  {
45  typedef T type;
46  };
47 }
48 
49 #endif // NPSTAT_PROPERDBLFROMCMPL_HH_
Definition: AbsArrayProjector.hh:14
Definition: ProperDblFromCmpl.hh:20