
11 Apr
2006
11 Apr
'06
9:35 a.m.
"Reece Dunn" <msclrhd@hotmail.com> writes:
Drawing influence from Python, I suggest that the non-throwing version look like:
std::pair<T,bool> string_to<T>(x)
allowing:
fn( string_to<Object>(object).first );
How does that draw influence from Python? That interface doesn't allow for types that can't be default constructed. optional<T> string_to<T>(x) seems more likely. -- Dave Abrahams Boost Consulting www.boost-consulting.com