[Dune] arithmetic operators for FieldVector<K,1>
Oliver Sander
sander at mi.fu-berlin.de
Thu Dec 7 13:52:05 CET 2006
My scalar codes compile when operator+ is removed from FieldVector<K,1>.
It does seem redundant and I vote for its removal.
--
Oliver
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75217 *
* Institut für Mathematik II ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
On Thu, 7 Dec 2006, Sven Marnach wrote:
> Hi all,
>
> I hit the same issue independently and I agree with Carsten.
>
> Carsten Graeser schrieb am Di, 05. Dez 2006, um 12:29:34 +0100:
>> The only point I can see is, that the operator only use '+=' and
>> not '+' of K. So if you use a type K that does not implement '+' in the
>> present version FieldVector<K,1> has operator '+'. But K is assumed
>> to be compatible with double and why should FieldVector<K,1> have '+'
>> if K has not ?
>
> Moreover, the operator + of FieldVector<K,1> can be used _only_ if K
> doesn't have an operator +; otherwise there would be an ambiguity. So
> this operator is really useless!
>
> Greetings,
> Sven
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://www.dune-project.org/cgi-bin/mailman/listinfo/dune
>
More information about the Dune
mailing list