a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
std_make_vector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 HEPfit Collaboration
3  *
4  *
5  * For the licensing terms see doc/COPYING.
6  */
7 
8 
9 #ifndef STD_MAKE_VECTOR_H
10 #define STD_MAKE_VECTOR_H
11 
12 #include <vector>
13 
14 template <typename T>
15 class make_vector {
16 public:
18 
19  my_type& operator<<(const T& val) {
20  data_.push_back(val);
21  return *this;
22  }
23 
24  operator std::vector<T>() const {
25  return data_;
26  }
27 private:
28  std::vector<T> data_;
29 };
30 
31 
32 #endif /* STD_MAKE_VECTOR_H */
33 
make_vector::data_
std::vector< T > data_
Definition: std_make_vector.h:28
make_vector
Definition: std_make_vector.h:15
make_vector::my_type
make_vector< T > my_type
Definition: std_make_vector.h:17
make_vector::operator<<
my_type & operator<<(const T &val)
Definition: std_make_vector.h:19