From afe773876e81c55b9f99dfc7c4bb41b4bdeb9da5 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Wed, 13 Sep 2023 15:12:21 +1000 Subject: [PATCH] Traits for non-geographical arrays --- include/traits.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/traits.h b/include/traits.h index 0807699..1b96c2f 100644 --- a/include/traits.h +++ b/include/traits.h @@ -167,3 +167,33 @@ concept ReadIs1DGeoArray = requires { std::declval>().Lat(0) } -> std::convertible_to; }; + +template +concept ReadIs2DXYRectArray = requires { + { + std::declval>().Ix2X(0) + } -> std::convertible_to; + { + std::declval>().Iy2Y(0) + } -> std::convertible_to; +}; + +template +concept ReadIs2DXYArray = requires { + { + std::declval>().X(0, 0) + } -> std::convertible_to; + { + std::declval>().Y(0, 0) + } -> std::convertible_to; +}; + +template +concept ReadIs1DArray = requires { + { + std::declval>().X(0) + } -> std::convertible_to; + { + std::declval>().Y(0) + } -> std::convertible_to; +};