template<class T1, class Allocator1, class RHS>
inline
vector<T1, Allocator1> &operator+=(vector<T1, Allocator1> &lhs, 
                                   const Expression<RHS> &rhs)
{
  evaluate(lhs, OpAddAssign(), rhs);
  return lhs;
}

Example 3: The operator+= function for accumulating a PETE expression into an STL vector.

Back to Article
Copyright © 1999, Dr. Dobb's Journal