From 93ec5be1f3cec2b2a373be28bb7a0b89db79357f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 17 Feb 2015 16:22:12 +1100 Subject: [PATCH] coord: add elements and value_type constants --- detail/coord.hpp | 1 + region.hpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/detail/coord.hpp b/detail/coord.hpp index f3157b37..174cbb0e 100644 --- a/detail/coord.hpp +++ b/detail/coord.hpp @@ -126,6 +126,7 @@ namespace util { typedef T value_type; static constexpr size_t dimension = S; + static constexpr size_t elements = S; using coord_data::coord_data; coord () = default; diff --git a/region.hpp b/region.hpp index b6646cf8..9c6d1ec7 100644 --- a/region.hpp +++ b/region.hpp @@ -35,7 +35,8 @@ namespace util { typedef T size_type; static constexpr size_t dimension = 2u; - typedef T value_type; + static constexpr size_t elements = dimension * 2; + using value_type = T; position_type x, y; size_type w, h;