Repository : http://git.fedorahosted.org/cgit/firewalld-recode.git
On branch : master
commit eac51ef7577a31a6f679bbf184d584c4440d0ffe Author: Daniel Kopecek dkopecek@redhat.com Date: Wed Oct 22 13:08:22 2014 +0200
Overload << operator for list and vector type
src/Common/Types.hpp | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/Common/Types.hpp b/src/Common/Types.hpp index 999ea78..78f4109 100644 --- a/src/Common/Types.hpp +++ b/src/Common/Types.hpp @@ -28,6 +28,18 @@
namespace firewalld { + template<typename T> + void operator<<(std::list<T> list, const T& value) + { + list.push_back(value); + } + + template<typename T> + void operator<<(std::vector<T> list, const T& value) + { + list.push_back(value); + } + // char strings typedef std::string String; typedef std::vector<String> StringVector;
firewalld-recode@lists.fedorahosted.org