Made dispatch::unique able to retrieve the tag by itself.

[SVN r80245]
This commit is contained in:
Bruno Lalande
2012-08-26 23:33:14 +00:00
parent 2151e81851
commit 7f5b0233e6
2 changed files with 8 additions and 12 deletions

View File

@@ -84,8 +84,8 @@ namespace dispatch
template
<
typename Tag,
typename Geometry
typename Geometry,
typename Tag = typename tag<Geometry>::type
>
struct unique
{
@@ -96,19 +96,19 @@ struct unique
template <typename Ring>
struct unique<ring_tag, Ring>
struct unique<Ring, ring_tag>
: detail::unique::range_unique
{};
template <typename LineString>
struct unique<linestring_tag, LineString>
struct unique<LineString, linestring_tag>
: detail::unique::range_unique
{};
template <typename Polygon>
struct unique<polygon_tag, Polygon>
struct unique<Polygon, polygon_tag>
: detail::unique::polygon_unique
{};
@@ -138,11 +138,7 @@ inline void unique(Geometry& geometry)
> policy;
dispatch::unique
<
typename tag<Geometry>::type,
Geometry
>::apply(geometry, policy());
dispatch::unique<Geometry>::apply(geometry, policy());
}
}} // namespace boost::geometry

View File

@@ -64,13 +64,13 @@ namespace dispatch
template <typename MultiLineString>
struct unique<multi_linestring_tag, MultiLineString>
struct unique<MultiLineString, multi_linestring_tag>
: detail::unique::multi_unique<detail::unique::range_unique>
{};
template <typename MultiPolygon>
struct unique<multi_polygon_tag, MultiPolygon>
struct unique<MultiPolygon, multi_polygon_tag>
: detail::unique::multi_unique<detail::unique::polygon_unique>
{};