[Dune] [#683] Requesting value_type and unary operator-() in FieldVector.
Dune
dune at dune-project.org
Fri Dec 4 21:44:48 CET 2009
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Atgeirr Flø Rasmussen (atgeirr)
Attached to Project - Dune
Summary - Requesting value_type and unary operator-() in FieldVector.
Task Type - Feature Request
Category - Common
Status - Unconfirmed
Assigned To -
Operating System - Unspecified / All
Severity - Low
Priority - Normal
Reported Version - SVN
Due in Version - Undecided
Due Date - Undecided
Details - For easier interoperability with STL containers, it would be useful to have the field type as a value_type typedef. Example implementation:
//! export the type representing the components, STL style
typedef K value_type;
A separate issue is the availability of unary operator-(), which makes generic programming easier, for instance:
T var;
...
T signed_var = oriented ? var : -var;
In this context, T cannot be a FieldVector without operator-(). Example implementation:
//! unary negation operator
FieldVector operator- () const
{
FieldVector z = *this;
for (size_type i=0; i<SIZE; i++)
z.p[i] = -z.p[i];
return z;
}
More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=683
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