From 10e9ae82aa249ded2483f0d303f194a0156deec0 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 19 Oct 2010 13:28:13 +0000 Subject: [PATCH] Core: Tuples now Moveable if all elements moveable (thanks a lot kohait00!) git-svn-id: svn://ultimatepp.org/upp/trunk@2795 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Tuple.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/uppsrc/Core/Tuple.h b/uppsrc/Core/Tuple.h index 1d2f3c065..2d7f9cee1 100644 --- a/uppsrc/Core/Tuple.h +++ b/uppsrc/Core/Tuple.h @@ -17,6 +17,13 @@ struct Tuple2 { String ToString() const { return String().Cat() << '(' << a << ", " << b << ')'; } }; +template +inline void AssertMoveable0(Tuple2 *) +{ + AssertMoveable(); + AssertMoveable(); +} + template inline Tuple2 MakeTuple(const A& a, const B& b) { @@ -46,6 +53,14 @@ struct Tuple3 { String ToString() const { return String().Cat() << '(' << a << ", " << b << ", " << c << ')'; } }; +template +inline void AssertMoveable0(Tuple3 *) +{ + AssertMoveable(); + AssertMoveable(); + AssertMoveable(); +} + template inline Tuple3 MakeTuple(const A& a, const B& b, const C& c) { @@ -77,6 +92,15 @@ struct Tuple4 { String ToString() const { return String().Cat() << '(' << a << ", " << b << ", " << c << ", " << d << ')'; } }; +template +inline void AssertMoveable0(Tuple4 *) +{ + AssertMoveable(); + AssertMoveable(); + AssertMoveable(); + AssertMoveable(); +} + template inline Tuple4 MakeTuple(const A& a, const B& b, const C& c, const D& d) {