Commit a435e406 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

provide scalar operators the other way round

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1483
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent be5134b6
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: operators.h,v 1.5 2004-02-10 15:27:40 tforb Exp $
* $Id: operators.h,v 1.6 2004-02-10 15:35:11 tforb Exp $
* \author Thomas Forbriger
* \date 10/02/2004
*
......@@ -54,7 +54,12 @@ namespace aff {
while ( i.valid() && o. valid() ) \
{ (*o) = (*i) OP value; ++o; ++i; } \
return(retval); \
}
} \
template<class AFF_OPERATORS_TEMPAR > \
RETCONT operator OP(typename INCONT::Tconst_reference value, \
const INCONT& container) \
{ return( container OP value ); }
#define AFF_OPERATORS_UNOPB( RETCONT, INCONT, OP ) \
template<class A , class B > \
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: operatortest.cc,v 1.4 2004-02-10 15:27:40 tforb Exp $
* $Id: operatortest.cc,v 1.5 2004-02-10 15:35:11 tforb Exp $
* \author Thomas Forbriger
* \date 10/02/2004
*
......@@ -19,7 +19,7 @@
#define OPERATORTEST_VERSION \
"OPERATORTEST V1.0 test operator functions"
#define OPERATORTEST_CVSID \
"$Id: operatortest.cc,v 1.4 2004-02-10 15:27:40 tforb Exp $"
"$Id: operatortest.cc,v 1.5 2004-02-10 15:35:11 tforb Exp $"
#include <iostream>
#include <complex>
......@@ -131,6 +131,8 @@ int main(int iargc, char* argv[])
DUMP(H);
DUMP((H *= G + 0.2) + 0.2);
DUMP(H);
DUMP(100+H);
DUMP(H+100);
}
/* ----- END OF operatortest.cc ----- */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment