From: John Torjo (john.lists_at_[hidden])
Date: 2004-12-15 10:37:27
> gui::textbox< long, lexical_converter< long > > age;
> However, because textbox is now a template, you get potential code
> bloat, especially if you are templating a more complex component such as
> a table (where in windows this is a "virtual" ListView control in report
> mode). I want to stear away from using templates as much as possible,
> using them where necessary, and keep the design as simple as it can be.
Yup, I certainly agree.
> In this case, the integer expressions are out by 1 depending on what
> rounding scheme is used. I took actual values to show the case above. If
> these were values in an algorithm that performed anti-aliasing for
> example, the anti-aliasing would not calculate the correct values.
I would say it would be the algorithm's task, if it needs such
precision, to convert from integer into floats, and then feed back the
results in integers. Or maybe I'm just too optimistic :)
-- John Torjo, Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -- http://www.torjo.com/cb/ - Click, Build, Run!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk