[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:05:47 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Jö Fahlke (joe) 

Attached to Project - Dune
Summary - Dune::array<T,n> has 'int' as the type for n while std::array has 'size_t'
Task Type - Bug Report
Category - Common
Status - New
Assigned To - 
Operating System - Unspecified / All
Severity - Low
Priority - Normal
Reported Version - SVN (pre2.1)
Due in Version - Undecided
Due Date - Undecided
Details - 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<array<T,n> >;

  // this will *not* match Dune's reimplementation of array
  template<class T, std::size_t n>
  struct<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