1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
template <class T>
BinaryOp<PVector::ConstIterator, T, Add> operator +(const PVector& v1, const T& v2){
return MakeAdd(v1.begin(), v2);
}
template <class T>
BinaryOp<T, PVector::ConstIterator, Add> operator +(const T& v1, const PVector& v2){
return MakeAdd(v1, v2.begin());
}
BinaryOp<PVector::ConstIterator, PVector::ConstIterator, Add> operator +(const PVector& v1, const PVector& v2){
return MakeAdd(v1.begin(), v2.begin());
}
BinaryOp<PVector::ConstIterator, PVector::ConstIterator, Sub> operator - (const PVector& v1, const PVector& v2){
return MakeSub(v1.begin(), v2.begin());
}
BinaryOp<PVector::ConstIterator, UnaryOp<double, Const>, Mult> operator * (const PVector& v1, double d){
return MakeMult(v1.begin(), MakeConst(d));
}
BinaryOp<PVector::ConstIterator, UnaryOp<double, Const>, Div> operator / (const PVector& v1, double d){
return MakeDiv(v1.begin(), MakeConst(d));
}
UnaryOp<PVector::ConstIterator, Minus> operator - (const PVector& v1){
return MakeMinus(v1.begin());
}
|