
8 May
2009
8 May
'09
8:39 p.m.
On 2009-05-06, Emre Turkay <emreturkay2@gmail.com> wrote:
I think ability to set persistent behavior would be nice. Something like this;
1. convert::set(locale_ = new_locale)(throw_ = true); 2. int i = convert<int>::from(str1, 0); 3. int j = convert<int>::from(str2, 0);
The line #1 effect lines following it (#2 & #3).
I really don't like the idea of global state for this. Making reusable "format packs" would be nice, though. Perhaps instances of the convert class should be allowed, so you could do something like this? convert<int> myconvert((locale_ = new_locale, throw_ = true)); int i = myconvert.from(str1, 0); int j = myconvert.from(str1, 0); Just musing, ~ Scott