diff --git a/point.hpp b/point.hpp index 4967cb6f..f7091094 100644 --- a/point.hpp +++ b/point.hpp @@ -34,6 +34,17 @@ namespace util { { using coord::base>::base; + // use a forwarding assignment operator so that we can let the base + // take care of the many different types of parameters. otherwise we + // have to deal with scalar, vector, initializer_list, ad nauseum. + template + point& + operator= (Arg&&arg) + { + coord::base>::operator=(std::forward (arg)); + return *this; + } + vector to (point dst) const { return dst - *this; } vector from (point src) const { return *this - src; }