
6 Apr
2009
6 Apr
'09
5:22 p.m.
Sorry if I skimmed over some of the conversation too quickly, but if not already mentioned, I'd like to suggest passing in the result as a (by ref) param when you want more status information: A) int i = convert<int>::from(str); // throws if necessary B) int i = convert<int>::from(str, 0); // default supplied so no throw C) convert<int>::result res; int i = convert<int>::from(str, res); // no throw - error/status result returned in 'res' int i = convert<int>::from(str, 0, res); // default + status I could also see using nothrow/dothrow in there somwhere, but it seems redundant. Tony