point/vector: use coord constructors

This commit is contained in:
Danny Robson 2015-01-13 18:39:27 +11:00
parent 82ee179b64
commit 64c11bdcb0
4 changed files with 2 additions and 20 deletions

View File

@ -31,12 +31,6 @@ using namespace std;
#pragma GCC optimize("-O3")
#endif
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::point<S,T>::point ()
{ ; }
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::point<S,T>&

View File

@ -34,10 +34,7 @@ namespace util {
struct point : public detail::coord<S,T> {
static_assert (S > 0, "point dimensions must be strictly positive.");
point ();
template <typename... U>
point (U ...u): detail::coord<S,T> {std::forward<U> (u)...} { ; }
using detail::coord<S,T>::coord;
// point operators
template <typename U> typename std::common_type<T,U>::type distance (const point<S,U> &) const;

View File

@ -38,12 +38,6 @@ using std::begin;
using std::end;
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::vector<S,T>::vector ()
{ ; }
//-----------------------------------------------------------------------------
template <size_t S, typename T>
util::vector<S,T>

View File

@ -32,10 +32,7 @@ namespace util {
struct vector : public detail::coord<S, T> {
static_assert (S > 0, "vector dimensions must be strictly positive");
vector ();
template <typename... U>
vector (U ...u): detail::coord<S, T> {std::forward<U> (u)...} { ; }
using detail::coord<S,T>::coord;
// arithmetic operators
vector<S,T> operator* (T) const;