-////////////////////////////////////////////////////////////////////////////////
-
-// 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<typename T1, typename T2, typename T3, typename T4>
- foursome<T1,T2,T3,T4>::foursome(void) :
- first(), second(), third(), fourth()
- {
- }
-
- template<typename T1, typename T2, typename T3, typename T4>
- foursome<T1,T2,T3,T4>::foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4) :
- first(p1), second(p2), third(p3), fourth(p4)
- {
- }
-
- template<typename T1, typename T2, typename T3, typename T4>
- foursome<T1,T2,T3,T4>::foursome(const foursome<T1,T2,T3,T4>& t2) :
- first(t2.first), second(t2.second), third(t2.third), fourth(t2.fourth)
- {
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // creation
-
- template<typename T1, typename T2, typename T3, typename T4>
- foursome<T1,T2,T3,T4> make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth)
- {
- return foursome<T1,T2,T3,T4>(first,second,third,fourth);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
- // comparison
-
- template<typename T1, typename T2, typename T3, typename T4>
- bool operator == (const foursome<T1,T2,T3,T4>& left, const foursome<T1,T2,T3,T4>& 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
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+// Author: Andy Rushton, from an original by Dan Milton\r
+// Copyright: (c) Southampton University 1999-2004\r
+// (c) Andy Rushton 2004 onwards\r
+// License: BSD License, see ../docs/license.html\r
+\r
+////////////////////////////////////////////////////////////////////////////////\r
+\r
+namespace stlplus\r
+{\r
+\r
+ ////////////////////////////////////////////////////////////////////////////////\r
+ // the foursome class\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ foursome<T1,T2,T3,T4>::foursome(void) :\r
+ first(), second(), third(), fourth()\r
+ {\r
+ }\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ foursome<T1,T2,T3,T4>::foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4) :\r
+ first(p1), second(p2), third(p3), fourth(p4)\r
+ {\r
+ }\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ foursome<T1,T2,T3,T4>::foursome(const foursome<T1,T2,T3,T4>& t2) :\r
+ first(t2.first), second(t2.second), third(t2.third), fourth(t2.fourth)\r
+ {\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////////////\r
+ // creation\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ foursome<T1,T2,T3,T4> make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth)\r
+ {\r
+ return foursome<T1,T2,T3,T4>(first,second,third,fourth);\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////////////\r
+ // comparison\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ bool operator == (const foursome<T1,T2,T3,T4>& left, const foursome<T1,T2,T3,T4>& right)\r
+ {\r
+ // foursomes are equal if all elements are equal\r
+ return\r
+ left.first == right.first &&\r
+ left.second == right.second &&\r
+ left.third == right.third &&\r
+ left.fourth == right.fourth;\r
+ }\r
+\r
+ template<typename T1, typename T2, typename T3, typename T4>\r
+ bool operator < (const foursome<T1,T2,T3,T4>& left, const foursome<T1,T2,T3,T4>& right)\r
+ {\r
+ // use the < operator on each element\r
+ return left.first < right.first ? true :\r
+ right.first < left.first ? false :\r
+ left.second < right.second ? true :\r
+ right.second < left.second ? false :\r
+ left.third < right.third ? true :\r
+ right.third < left.third ? false :\r
+ left.fourth < right.fourth;\r
+ }\r
+\r
+ ////////////////////////////////////////////////////////////////////////////////\r
+\r
+} // end namespace stlplus\r