X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fcontainers%2Ftriple.hpp;h=2b1908709037b78962261cf92d7b1e8e1ffd0969;hp=bf501f53dc74486fbc481313747cb232a882f1ef;hb=4f6e4488a55f7e3ba3f7485d78177f793c0eab9a;hpb=574af38ed616d1adfa5e6ce35f67cda1f707f89d diff --git a/src/stlplus/containers/triple.hpp b/src/stlplus/containers/triple.hpp index bf501f5..2b19087 100644 --- a/src/stlplus/containers/triple.hpp +++ b/src/stlplus/containers/triple.hpp @@ -1,54 +1,56 @@ -#ifndef STLPLUS_TRIPLE -#define STLPLUS_TRIPLE -//////////////////////////////////////////////////////////////////////////////// - -// 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 - -// Similar to the STL pair but with three elements - -//////////////////////////////////////////////////////////////////////////////// -#include "containers_fixes.hpp" - -namespace stlplus -{ - - //////////////////////////////////////////////////////////////////////////////// - // the triple class - - template - struct triple - { - typedef T1 first_type; - typedef T2 second_type; - typedef T3 third_type; - - T1 first; - T2 second; - T3 third; - - triple(void); - triple(const T1& p1, const T2& p2, const T3& p3); - triple(const triple& t2); - }; - - //////////////////////////////////////////////////////////////////////////////// - // creation - - template - triple make_triple(const T1& first, const T2& second, const T3& third); - - //////////////////////////////////////////////////////////////////////////////// - // comparison - - template - bool operator == (const triple& left, const triple& right); - - //////////////////////////////////////////////////////////////////////////////// - -} // end namespace stlplus - -#include "triple.tpp" -#endif +#ifndef STLPLUS_TRIPLE +#define STLPLUS_TRIPLE +//////////////////////////////////////////////////////////////////////////////// + +// 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 + +// Similar to the STL pair but with three elements + +//////////////////////////////////////////////////////////////////////////////// +#include "containers_fixes.hpp" + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // the triple class + + template + struct triple + { + typedef T1 first_type; + typedef T2 second_type; + typedef T3 third_type; + + T1 first; + T2 second; + T3 third; + + triple(void); + triple(const T1& p1, const T2& p2, const T3& p3); + triple(const triple& t2); + }; + + //////////////////////////////////////////////////////////////////////////////// + // creation + + template + triple make_triple(const T1& first, const T2& second, const T3& third); + + //////////////////////////////////////////////////////////////////////////////// + // comparison + + template + bool operator == (const triple& left, const triple& right); + template + bool operator < (const triple& left, const triple& right); + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus + +#include "triple.tpp" +#endif