Browse Source

Traits for non-geographical arrays

lintest
Michael Uleysky 1 year ago
parent
commit
afe773876e
  1. 30
      include/traits.h

30
include/traits.h

@ -167,3 +167,33 @@ concept ReadIs1DGeoArray = requires {
std::declval<ReadType<T>>().Lat(0) std::declval<ReadType<T>>().Lat(0)
} -> std::convertible_to<real>; } -> std::convertible_to<real>;
}; };
template<class T>
concept ReadIs2DXYRectArray = requires {
{
std::declval<ReadType<T>>().Ix2X(0)
} -> std::convertible_to<real>;
{
std::declval<ReadType<T>>().Iy2Y(0)
} -> std::convertible_to<real>;
};
template<class T>
concept ReadIs2DXYArray = requires {
{
std::declval<ReadType<T>>().X(0, 0)
} -> std::convertible_to<real>;
{
std::declval<ReadType<T>>().Y(0, 0)
} -> std::convertible_to<real>;
};
template<class T>
concept ReadIs1DArray = requires {
{
std::declval<ReadType<T>>().X(0)
} -> std::convertible_to<real>;
{
std::declval<ReadType<T>>().Y(0)
} -> std::convertible_to<real>;
};

Loading…
Cancel
Save