Boost logo

Boost :

Subject: Re: [boost] [Polygon] What does this error mean?
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2009-09-02 14:40:07


Simonson, Lucanus J wrote:
> I boils down to the fact that you are using std::pair<int, int> for your
> interval return type in get() in the screen_box_t traits, but did not
> register it as a type of interval concept or define traits for it. If
> you set up the interval_traits for std::pair and register it with a
> specialization of geometry_concept for interval_concept you should be fine.

I've added this:

template <>
struct geometry_concept< std::pair<screen_coord_t,screen_coord_t> > {
   typedef interval_concept type;
};

template <>
struct interval_traits< std::pair<screen_coord_t,screen_coord_t> > {
   typedef screen_coord_t coordinate_type;
   static inline coordinate_type get(const
std::pair<screen_coord_t,screen_coord_t>& interval,
                                     direction_1d dir) {
     return (dir==LOW) ? interval.first : interval.second;
   }
};

and I seem to be getting much the same error.

Any ideas?

Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk