From 6d15812d7d93370d47e63f6bf9f70be40f5a9c5d Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:21:16 +0200 Subject: 5.7 --- zen/fixed_list.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'zen/fixed_list.h') diff --git a/zen/fixed_list.h b/zen/fixed_list.h index 60d7e0e7..6d083f8b 100644 --- a/zen/fixed_list.h +++ b/zen/fixed_list.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zhnmju123 AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef FIXED_LIST_01238467085684139453534 @@ -20,12 +20,13 @@ class FixedList { Node() : next(nullptr), val() {} //no variadic templates on VC2010... :( - template Node(A&& a) : next(nullptr), val(std::forward(a)) {} - template Node(A&& a, B&& b) : next(nullptr), val(std::forward(a), std::forward(b)) {} - template Node(A&& a, B&& b, C&& c) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c)) {} - template Node(A&& a, B&& b, C&& c, D&& d) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d)) {} - template Node(A&& a, B&& b, C&& c, D&& d, E&& e) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e)) {} - template Node(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f)) {} + template Node(A&& a) : next(nullptr), val(std::forward(a)) {} + template Node(A&& a, B&& b) : next(nullptr), val(std::forward(a), std::forward(b)) {} + template Node(A&& a, B&& b, C&& c) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c)) {} + template Node(A&& a, B&& b, C&& c, D&& d) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d)) {} + template Node(A&& a, B&& b, C&& c, D&& d, E&& e) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e)) {} + template Node(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f)) {} + template Node(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f, G&& g) : next(nullptr), val(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f), std::forward(g)) {} Node* next; //singly linked list is sufficient T val; @@ -75,12 +76,13 @@ public: const_reference& back() const { return lastInsert->val; } void emplace_back() { pushNode(new Node); } - template void emplace_back(A&& a) { pushNode(new Node(std::forward(a))); } - template void emplace_back(A&& a, B&& b) { pushNode(new Node(std::forward(a), std::forward(b))); } - template void emplace_back(A&& a, B&& b, C&& c) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c))); } - template void emplace_back(A&& a, B&& b, C&& c, D&& d) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d))); } - template void emplace_back(A&& a, B&& b, C&& c, D&& d, E&& e) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e))); } - template void emplace_back(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f))); } + template void emplace_back(A&& a) { pushNode(new Node(std::forward(a))); } + template void emplace_back(A&& a, B&& b) { pushNode(new Node(std::forward(a), std::forward(b))); } + template void emplace_back(A&& a, B&& b, C&& c) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c))); } + template void emplace_back(A&& a, B&& b, C&& c, D&& d) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d))); } + template void emplace_back(A&& a, B&& b, C&& c, D&& d, E&& e) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e))); } + template void emplace_back(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f))); } + template void emplace_back(A&& a, B&& b, C&& c, D&& d, E&& e, F&& f, G&& g) { pushNode(new Node(std::forward(a), std::forward(b), std::forward(c), std::forward(d), std::forward(e), std::forward(f), std::forward(g))); } template void remove_if(Predicate pred) -- cgit