Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-10-04 05:43:42

John Torjo wrote:

>And, about usability in code. Why would I want in my program, both:
>gui::rect<pc,double> and gui::rect<pc,int> ?
>This IMHO would confuse users of the library.
I would think that floats make the most sense for percentage based
rectangles, while ints make the most sense for absolute pixel position
based rectangles. So perhaps something like the following might be

struct px { typedef int pos_type; };
struct pc { typedef float pos_type; };

gui::rect < px > rect1;
gui::rect < pc > rect2;


Boost list run by bdawes at, gregod at, cpdaniel at, john at