X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fcontainers%2Ffoursome.tpp;h=b2bfe08d4679e6bc39d3122429fd9b678a7ef6a0;hp=f1dd9b39c66b2352352371e17e12f7474c2d8213;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36 diff --git a/src/stlplus/containers/foursome.tpp b/src/stlplus/containers/foursome.tpp index f1dd9b3..b2bfe08 100644 --- a/src/stlplus/containers/foursome.tpp +++ b/src/stlplus/containers/foursome.tpp @@ -1,59 +1,59 @@ -//////////////////////////////////////////////////////////////////////////////// - -// Author: Andy Rushton, from an original by Dan Milton -// Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 -// License: BSD License, see ../docs/license.html - -//////////////////////////////////////////////////////////////////////////////// - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - // the foursome class - - template - foursome::foursome(void) : - first(), second(), third(), fourth() - { - } - - template - foursome::foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4) : - first(p1), second(p2), third(p3), fourth(p4) - { - } - - template - foursome::foursome(const foursome& t2) : - first(t2.first), second(t2.second), third(t2.third), fourth(t2.fourth) - { - } - - //////////////////////////////////////////////////////////////////////////////// - // creation - - template - foursome make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth) - { - return foursome(first,second,third,fourth); - } - - //////////////////////////////////////////////////////////////////////////////// - // comparison - - template - bool operator == (const foursome& left, const foursome& right) - { - // foursomes are equal if all elements are equal - return - left.first == right.first && - left.second == right.second && - left.third == right.third && - left.fourth == right.fourth; - } - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton, from an original by Dan Milton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +//////////////////////////////////////////////////////////////////////////////// + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // the foursome class + + template + foursome::foursome(void) : + first(), second(), third(), fourth() + { + } + + template + foursome::foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4) : + first(p1), second(p2), third(p3), fourth(p4) + { + } + + template + foursome::foursome(const foursome& t2) : + first(t2.first), second(t2.second), third(t2.third), fourth(t2.fourth) + { + } + + //////////////////////////////////////////////////////////////////////////////// + // creation + + template + foursome make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth) + { + return foursome(first,second,third,fourth); + } + + //////////////////////////////////////////////////////////////////////////////// + // comparison + + template + bool operator == (const foursome& left, const foursome& right) + { + // foursomes are equal if all elements are equal + return + left.first == right.first && + left.second == right.second && + left.third == right.third && + left.fourth == right.fourth; + } + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus