[Dune] [#829] Dune::array<T, n> has 'int' as the type for n while std::array has 'size_t'

Dune flyspray at dune-project.org
Thu Oct 21 13:41:02 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has been changed.  The changes are listed below.  For full information about what has changed, visit the URL and click the History tab.

FS#829 - Dune::array<T,n> has 'int' as the type for n while std::array has 'size_t'
User who did this: Jö Fahlke (joe)
Task details edited:
-------
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<class U>
  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.

-------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=829

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list