Boost logo

Boost Users :

Subject: Re: [Boost-users] Weird compilation error when using boost::geometry
From: Jeremy Murphy (jeremy.william.murphy_at_[hidden])
Date: 2017-11-16 22:19:14


On 15 November 2017 at 22:28, Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]>
wrote:

> Hi Jeremy,
>
> Jeremy Murphy wrote:
>
> is there any other way around/through this? I am working with a point
> geometry with the same issue: the template type for dimensions is 'int' and
> it would be a lot of hassle to change it.
>
>
> The type in trait specialization has to be specified correctly. So
> assuming that you don't want to change the geometry template you should
> change the specialization, like this:
>
> template<typename T, *int* tDimension = 2>
> class Point {};
>
> // ...
>
> template<typename Type, *int* tDimension>
> struct tag<Point<Type, tDimension>> {
> typedef point_tag type;
> };
>
> Adam
>
>
Thanks, Adam, that worked a treat.
Cheers.

Jeremy



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net