Working on a concept like so:
template<typename PointType, typename NumberType>
concept Pointlike = requires(PointType point) {
requires std::derived_from<PointType, Point<NumberType>>;
{ point.x } -> std::convertible_to<NumberType>;
{ point.y } -> std::convertible_to<NumberType>;
requires arithmetic<NumberType>;
};
Which works, but I would like to replace std::convertible with something like std::same_as, but I'm hitting problems with an int& bubbling up to compare with int which is not allowed, obviously.
I'm not sure the best way to allow for this comparison google says maybe std::decay or std::remove_cvref but I can't get the syntax to work right. Or am I maybe calling the method wrong someplace?