X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fcontainers%2Ftriple.tpp;h=50c2d7072b7864cb38c71e38d03866d577d773b3;hp=60e94aa616f881434222faf590a8197ea1c43b32;hb=4f6e4488a55f7e3ba3f7485d78177f793c0eab9a;hpb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c diff --git a/src/stlplus/containers/triple.tpp b/src/stlplus/containers/triple.tpp index 60e94aa..50c2d70 100644 --- a/src/stlplus/containers/triple.tpp +++ b/src/stlplus/containers/triple.tpp @@ -2,7 +2,7 @@ // Author: Andy Rushton, from an original by Dan Milton // Copyright: (c) Southampton University 1999-2004 -// (c) Andy Rushton 2004-2009 +// (c) Andy Rushton 2004 onwards // License: BSD License, see ../docs/license.html //////////////////////////////////////////////////////////////////////////////// @@ -50,6 +50,17 @@ namespace stlplus return left.first == right.first && left.second == right.second && left.third == right.third; } + template + bool operator < (const triple& left, const triple& right) + { + // use the < operator on each element + return left.first < right.first ? true : + right.first < left.first ? false : + left.second < right.second ? true : + right.second < left.second ? false : + left.third < right.third; + } + //////////////////////////////////////////////////////////////////////////////// } // end namespace stlplus