#829 Dune::array<T,n> has 'int' as the type for n while std::array has 'size_t'
Metadata
| Property | Value |
|---|---|
| Reported by | Jö Fahlke (jorrit@jorrit.de) |
| Reported at | Oct 21, 2010 11:05 |
| Type | Bug Report |
| Version | Git (pre2.4) [autotools] |
| Operating System | Unspecified / All |
| Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Last edited at | Oct 24, 2010 12:56 |
| Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
| Closed at | Oct 24, 2010 12:56 |
| Closed in version | Unknown |
| Resolution | Fixed |
| Comment | Since rev 6200 Dune::array uses size_t |
Description
Dune's replacement implementation of array is declared as
template<class T, int n> struct array;
The standard implementation is however declared as
template<class T, size_t n> struct array;
This is problematic, since specializing for array will not work properly:
template struct hurz;
// this will not match the array imported from C++0x template<class T, int n> struct hurz<array<T,n> >;
// this will not match Dune's reimplementation of array template<class T, std::size_t n> struct hurz<array<T,n> >;
I am reluctant to simply change this however. There may actually be specialisations in Dune which assume n is an 'int'. We should check for those before changing this.
There may also be similar specializations in user modules, but I guess there is little we can do about those.