
From: "David Abrahams" <dave@boostpro.com> ...
int i = convert<int>::from(str, 0)(locale_ = new_locale)(throw_ = true); int i = convert<int>::from(str, 0, locale_ = new_locale, throw_ = true);
But again, it has the downside that none of your calls above can return an actual int. That can have unexpected effects, e.g. in
some_function_template( convert<int>::from(str, 0) )
when the deduced template argument is actually your proxy type.
Yes, that is a fair point. The way around it is some_function_template( convert<int>::from(str, 0).value() ) Returning the value (rather than a proxy) was *very* tempting... but seemed *very* limiting. Like chaining of additional configuration parameters (notably i/o stream manipulatiors) would be impossible. Still, I'll take another look if I can see things differently this time around. V.