[Dune] [Dune-Commit] dune-common r6198 - trunk/dune/common

Oliver Sander sander at mi.fu-berlin.de
Thu Oct 21 11:38:57 CEST 2010


Hi Jö!
Isn't this int-vs.-std::size_t problem simply a bug in our implementation
of 'array' which should be fixed?

best,
Oliver

>
> +  // Yes, there are two specializations for array.  This one is for the Dune
> +  // implementation, which takes the size as an int.
> +  template<typename T, int n>
> +  struct ParameterTree::Parser<array<T, n>  >  {
> +    static array<T, n>
> +    parse(const std::string&  str) {
> +      array<T, n>  val;
> +      parseRange(str, val.begin(), val.end());
> +      return val;
> +    }
> +  };
> +
> +  // Yes, there are two specializations for array.  This one is for the
> +  // implementation from the standard, which takes the size as a size_t.
> +  template<typename T, std::size_t n>
> +  struct ParameterTree::Parser<array<T, n>  >  {
> +    static array<T, n>
> +    parse(const std::string&  str) {
> +      array<T, n>  val;
> +      parseRange(str, val.begin(), val.end());
> +      return val;
> +    }
> +  };
> +
>     template<typename T, typename A>
>     struct ParameterTree::Parser<std::vector<T, A>  >  {
>       static std::vector<T, A>
>
>
> _______________________________________________
> Dune-Commit mailing list
> Dune-Commit at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-commit
>    


-- 
************************************************************************
* Oliver Sander                ** email: sander at mi.fu-berlin.de        *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75348           *
* Institut für Mathematik      ** URL  : page.mi.fu-berlin.de/~sander  *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************





More information about the Dune mailing list