[Dune] [Dune-Commit] dune-common r5321 - in trunk/common: . test

Christian Engwer christi at uni-hd.de
Mon Oct 20 11:33:26 CEST 2008


> gcc-4.1.2 would produce a warning when checking conversion from 'int' to 'double'

I'm afraid we need a more general approach. What about long int ->
double, or int -> float, etc...

Christian

> ===================================================================
> --- trunk/common/typetraits.hh	2008-10-19 21:07:15 UTC (rev 5320)
> +++ trunk/common/typetraits.hh	2008-10-20 08:49:07 UTC (rev 5321)
> @@ -214,8 +214,19 @@
>        isTwoWay = false,
>        sameType = false
>      };
> -  }; 
> +  };
>  
> +  template<>
> +  class Conversion< int, double >
> +  {
> +  public:
> +    enum {
> +      exists = true,
> +      isTwoWay = false,
> +      sameType = false
> +    };
> +  };
> +
>    template<class T>
>    class Conversion<T,T>{
>    public:




More information about the Dune mailing list