Subject: Re: [geometry] translation and rotation proposal
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-06-22 14:45:03
2013/6/22 Bruno Lalande <bruno.lalande_at_[hidden]>
> Ok, the Vector Concept looks obvious as it would be probably exactly the
>> same as Point.
> Yep, as I said one question is: should vector_type<point> just return
> point by default, and users interested in vector/point differentiation
> would have to state it by specializing the metafunction (or calling a
> convenience macro)? or should it enforce point/vector differentiation
> straight away? Personally, for backward compatibility and "simplicity by
> default" reasons, I'd vote for the former.
But why do we need vector_type at all? If we had Vector concept it should
just work with algorithms. And difference() could work for Points and
Vectors. The user could call
Point p = return_difference<Point>(p1, p2);
or if he want to use some legacy vector class he could adapt it to the
Vector concept and use it:
MyVector v = return_difference<MyVector>(p1, p2);
just like in the case of Geometries.
Geometry list run by mateusz at loskot.net