X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fcontainers%2Ffoursome.hpp;fp=src%2Fstlplus%2Fcontainers%2Ffoursome.hpp;h=adae1466a11097748187d25f6bdd02e84363bd18;hp=46dc46ddc5c6e00da2028bc26c6e3f94ced0c9e8;hb=4f6e4488a55f7e3ba3f7485d78177f793c0eab9a;hpb=574af38ed616d1adfa5e6ce35f67cda1f707f89d diff --git a/src/stlplus/containers/foursome.hpp b/src/stlplus/containers/foursome.hpp index 46dc46d..adae146 100644 --- a/src/stlplus/containers/foursome.hpp +++ b/src/stlplus/containers/foursome.hpp @@ -1,59 +1,61 @@ -#ifndef STLPLUS_FOURSOME -#define STLPLUS_FOURSOME -//////////////////////////////////////////////////////////////////////////////// - -// 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 - -// The next in the series pair->triple->foursome - -// Originally called quadruple but that clashed (as did quad) with system -// libraries on some operating systems - -//////////////////////////////////////////////////////////////////////////////// -#include "containers_fixes.hpp" - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - // the foursome class - - template - struct foursome - { - typedef T1 first_type; - typedef T2 second_type; - typedef T3 third_type; - typedef T4 fourth_type; - - T1 first; - T2 second; - T3 third; - T4 fourth; - - foursome(void); - foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4); - foursome(const foursome& t2); - }; - - //////////////////////////////////////////////////////////////////////////////// - // creation - - template - foursome make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth); - - //////////////////////////////////////////////////////////////////////////////// - // comparison - - template - bool operator == (const foursome& left, const foursome& right); - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus - -#include "foursome.tpp" -#endif +#ifndef STLPLUS_FOURSOME +#define STLPLUS_FOURSOME +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton, from an original by Dan Milton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004 onwards +// License: BSD License, see ../docs/license.html + +// The next in the series pair->triple->foursome + +// Originally called quadruple but that clashed (as did quad) with system +// libraries on some operating systems + +//////////////////////////////////////////////////////////////////////////////// +#include "containers_fixes.hpp" + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // the foursome class + + template + struct foursome + { + typedef T1 first_type; + typedef T2 second_type; + typedef T3 third_type; + typedef T4 fourth_type; + + T1 first; + T2 second; + T3 third; + T4 fourth; + + foursome(void); + foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4); + foursome(const foursome& t2); + }; + + //////////////////////////////////////////////////////////////////////////////// + // creation + + template + foursome make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth); + + //////////////////////////////////////////////////////////////////////////////// + // comparison + + template + bool operator == (const foursome& left, const foursome& right); + template + bool operator < (const foursome& left, const foursome& right); + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus + +#include "foursome.tpp" +#endif