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 
00005 #include <complex>
00006 
00007 namespace Dune {
00008 
00016 template<class T>
00017 struct FieldTraits
00018 {
00020         typedef T field_type;
00022         typedef T real_type;
00023 };
00024 
00025 template<class T>
00026 struct FieldTraits<const T>
00027 {
00028     typedef typename FieldTraits<T>::field_type field_type;
00029     typedef typename FieldTraits<T>::real_type real_type;
00030 };
00031 
00032 template<class T>
00033 struct FieldTraits< std::complex<T> >
00034 {
00035     typedef std::complex<T> field_type;
00036     typedef T real_type;
00037 };
00038 
00039 } // end namespace Dune
00040 
00041 #endif // DUNE_FTRAITS_HH

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].