LocARNA-1.8.11
plusvector.hh
1 #ifndef LOCARNA_PLUSVECTOR_HH
2 #define LOCARNA_PLUSVECTOR_HH
3 
4 #ifdef HAVE_CONFIG_H
5 # include <config.h>
6 #endif
7 
8 #include <vector>
9 
10 namespace LocARNA {
18  template<class T>
19  class plusvector: public std::vector<T> {
20 
21  public:
22 
31  plusvector& operator += (const T &x) {
32  this->push_back(x);
33  return *this;
34  }
35  };
36 
37 }
38 
39 #endif // LOCARNA_PLUSVECTOR_HH
Implements a vector with += operator.
Definition: alignment_impl.hh:13
Definition: aligner.cc:17
plusvector & operator+=(const T &x)
Add an element to end of vector.
Definition: plusvector.hh:31