
Simonson, Lucanus J wrote:
template <typename geometry_type_1, typename geometry_type_2> polygon_set_view operator&(const geometry_type_1& geo1, const geometry_type_2& geo2) { ...tag dispatching and so forth... }
Steven Watanabe wrote: I hope that this is not the actual declaration. Completely generic operator overloads are dangerous.
There is no declaration yet, since I haven't finalized the design. I was thinking that it could be solved by registering the geometry types for which operator overloading is safe as operator args in the geometry_traits. template <> geometry_traits<UserPolygonSet> { typedef polygon_set_concept geometry_concept; typedef UserPolygonSet operator_arg; }; ... template <typename geometry_type_1, typename geometry_type_2> polygon_set_view operator&( typename geometry_traits<geometry_type_1>::operator_arg const& geo1, typename geometry_traits<geometry_type_2>::operator_arg const& geo2); Would this proposed solution address your concern about safety? Is there another way to make it safe that you would suggest instead? Thanks, Luke