Boost logo

Boost :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2000-01-30 10:55:51


Ok. Here is a new version - within a new namespace 'geometry2d', as
Dave has suggested. (I've also uploaded it to the vault.)

Two major modifications were made since the last post:

1) 'delta' class was removed, and now we have only two geometry2d
classes - 'point' and 'rectangle';

2) some member functions in both classes were rewritten as member
templates - so now we can write something like

| rectangle<double> rect;
| rect += point<long>( 10, 0 );

I think the whole thing is quite smooth now. Probably the only things
we don't have yet are a template constructor from arbitrary type and
a template conversion function to such a type (which are intended to
perform conversions between our and platform-dependent geometry
classes), e.g.

template<class T1, class T2>
class rectangle {
// ...
template<class U>
rectangle( call_traits<U>::param_type u ) { assert( 0 ); }

template<class U>
operator U() { assert( 0 ); }
// ...
};

and there must be a specialization of these members in a
platform-specific header...

But anyway - what everybody think about the code we have by now??
Assuming what almost everyone have written these classes some time
ago, do you have any comments about this version?

-Alexy




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