19 #ifndef MIR_GEOMETRY_POINT_GENERIC_H_
20 #define MIR_GEOMETRY_POINT_GENERIC_H_
35 template<
template<
typename>
typename T>
37 template<
template<
typename>
typename T>
40 template<
template<
typename>
typename T>
43 template<
typename Tag>
53 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
54 explicit constexpr
Point(P
const& other) noexcept
55 :
x{T<XTag>{other.x}},
60 template<
typename XType,
typename YType>
67 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
68 inline constexpr
bool operator == (P
const& lhs, P
const& rhs)
70 return lhs.x == rhs.x && lhs.y == rhs.y;
73 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
74 inline constexpr
bool operator != (P
const& lhs, P
const& rhs)
76 return lhs.x != rhs.x || lhs.y != rhs.y;
79 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
81 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
84 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
86 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
89 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
91 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
94 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
96 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
99 template<typename P, typename std::enable_if<std::is_base_of<detail::PointBase, P>::value,
bool>::type =
true>
102 out << value.x <<
", " << value.y;
110 #endif // MIR_GEOMETRY_POINT_GENERIC_H_