coord: add elements and value_type constants

This commit is contained in:
Danny Robson 2015-02-17 16:22:12 +11:00
parent c4df8bf905
commit 93ec5be1f3
2 changed files with 3 additions and 1 deletions

View File

@ -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<S,T>::coord_data;
coord () = default;

View File

@ -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;