From eda97b844b004bc4d2dcab75ec764b4a396e2313 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 2 Mar 2015 18:47:22 +1100 Subject: [PATCH] extent: add MIN/MAX static members --- extent.cpp | 15 +++++++++++++++ extent.hpp | 3 +++ 2 files changed, 18 insertions(+) diff --git a/extent.cpp b/extent.cpp index baeb8bd7..37ae21ba 100644 --- a/extent.cpp +++ b/extent.cpp @@ -136,6 +136,21 @@ util::extent::operator ==(const extent& rhs) const } +/////////////////////////////////////////////////////////////////////////////// +template +const util::extent util::extent::MIN { + 0, 0 +}; + + +//----------------------------------------------------------------------------- +template +const util::extent util::extent::MAX { + std::numeric_limits::max (), + std::numeric_limits::max () +}; + + /////////////////////////////////////////////////////////////////////////////// namespace debug { template diff --git a/extent.hpp b/extent.hpp index e36ff71c..bc6fe503 100644 --- a/extent.hpp +++ b/extent.hpp @@ -56,6 +56,9 @@ namespace util { template extent cast (void) const; + + static const extent MAX; + static const extent MIN; }; typedef extent extent2i;