9 #ifndef CUBBYFLOW_POINT_H 10 #define CUBBYFLOW_POINT_H 13 #include <type_traits> 23 template <
typename T,
size_t N>
27 static_assert(N > 0,
"Size of static-sized point should be greater than zero.");
28 static_assert(std::is_arithmetic<T>::value,
"Point only can be instantiated with arithmetic types");
34 template <
typename... Params>
35 explicit Point(Params... params);
39 explicit Point(
const std::initializer_list<U>& list);
46 void Set(
const std::initializer_list<U>& list);
65 std::array<T, N> m_elements;
67 template <
typename... Params>
68 void SetAt(
size_t i, T v, Params... params);
70 void SetAt(
size_t i, T v);
void Set(const std::initializer_list< U > &list)
Set point instance with initializer list.
Definition: Point-Impl.h:57
Generic N-D point class.
Definition: Point.h:24
Definition: pybind11Utils.h:24
Point & operator=(const std::initializer_list< U > &list)
Set point instance with initializer list.
const T & operator[](size_t i) const
Returns the const reference to the i -th element.
Definition: Point-Impl.h:91
Point()
Constructs a point with zeros.
Definition: Point-Impl.h:17