Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-01-05 15:28:36


At 02:05 PM 1/5/00 -0600, Aleksey Gurtovoy wrote:

>By the way, Dave (and others ;), what are you think about idea to
make all
>geometry classes to depend on two template arguments - one for
x-coordinate
>type, and other fo y one? I know people who prefer to distinguish x
and y
>types in order to prevent silly errors like r.assign( p1.y(),
p2.x(),
>p2.x(), p1.y() ). They do it by using two inheritance-unrelated
template
>wrappers for x and y coordinate types. I think we can allow such the
>technique with our classes - we need just add the second template
argument
>and assign T2 = T1 by default. Your thoughts?

You need to do that if there is to be any hope of using the classes
for geographic coordinates. Latitude is a very different animal from
Longitude.

--Beman


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