dune-common  2.2.0
ftraits.hh
Go to the documentation of this file.
00001 // $Id: fvector.hh 5262 2008-09-07 09:03:38Z christi $
00002 #ifndef DUNE_FTRAITS_HH
00003 #define DUNE_FTRAITS_HH
00004 
00009 #include <complex>
00010 
00011 namespace Dune {
00012 
00020 template<class T>
00021 struct FieldTraits
00022 {
00024         typedef T field_type;
00026         typedef T real_type;
00027 };
00028 
00029 template<class T>
00030 struct FieldTraits<const T>
00031 {
00032     typedef typename FieldTraits<T>::field_type field_type;
00033     typedef typename FieldTraits<T>::real_type real_type;
00034 };
00035 
00036 template<class T>
00037 struct FieldTraits< std::complex<T> >
00038 {
00039     typedef std::complex<T> field_type;
00040     typedef T real_type;
00041 };
00042 
00043 } // end namespace Dune
00044 
00045 #endif // DUNE_FTRAITS_HH