17#ifndef MIR_GEOMETRY_POINT_GENERIC_H_
18#define MIR_GEOMETRY_POINT_GENERIC_H_
33template<
template<
typename>
typename T>
35template<
template<
typename>
typename T>
38template<
template<
typename>
typename T>
41 template<
typename Tag>
51 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
52 explicit constexpr Point(P
const& other) noexcept
53 :
x{T<XTag>{other.x}},
58 template<
typename XType,
typename YType>
65template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
68 return lhs.x == rhs.x && lhs.y == rhs.y;
71template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
74 return lhs.x != rhs.x || lhs.y != rhs.y;
77template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
79template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
82template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
84template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
87template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
89template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
92template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
94template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
97template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
98std::ostream&
operator<<(std::ostream& out, P
const& value)
100 out << value.x <<
", " << value.y;
std::ostream & operator<<(std::ostream &out, W const &value)
Definition: dimensions_generic.h:142
constexpr D operator-(D const &lhs, D const &rhs)
Definition: displacement_generic.h:94
typename GeometricType::template Corresponding< Tag > Corresponding
Definition: dimensions_generic.h:139
constexpr bool operator!=(D const &lhs, D const &rhs)
Definition: displacement_generic.h:75
constexpr D operator+(D const &lhs, D const &rhs)
Definition: displacement_generic.h:88
constexpr bool operator==(D const &lhs, D const &rhs)
Definition: displacement_generic.h:69
constexpr D::PointType & operator+=(typename D::PointType &lhs, D const &rhs)
Definition: displacement_generic.h:130
constexpr D::PointType & operator-=(typename D::PointType &lhs, D const &rhs)
Definition: displacement_generic.h:136
Definition: splash_session.h:22
Definition: displacement.h:30
Used for determining if a type is a point.
Definition: point_generic.h:29
Definition: displacement_generic.h:43
Definition: point_generic.h:40
T< XTag > x
Definition: point_generic.h:61
T< Tag > Corresponding
Definition: point_generic.h:42
T< YTag > y
Definition: point_generic.h:62
constexpr Point(P const &other) noexcept
Definition: point_generic.h:52
Point & operator=(Point const &)=default
constexpr Point()=default
constexpr Point(Point const &)=default
constexpr Point(XType &&x, YType &&y)
Definition: point_generic.h:59
Definition: size_generic.h:41