Re: [boost] Formal Review Request: Boost.Convert

I've implemented the functionality as I described (convert as a class) and uploaded it as v0.21. I feel it is a considerable step forward in many respects as now it is more of a conversion 'framework' as users can create their specific specializations of boost::convert for their specific needs (as I did with lexical_cast). At the same time it feels reconciliatory as fighting over names could be put to rest (I hope) as we or the users might write simple and generic wrappers to boost::convert. In particular, I added boost::convert_to and boost::convert_from. It's just a suggestion. We might decide to keep them or remove or rename them. I am not fussy about it. So, the deployment loos as follows: // Explicitly specified 'from' and 'to' types. My personal preference int i = boost::convert<string, int>(str, -1); string s = boost::convert<int, string>(-1, "conversion failed"); // Deduced 'from' type. int i = boost::convert_to<int>(str); string s = boost::convert_to<string>(-1); // Both types are deduced. int i = boost::convert_from(str, -1); string s = boost::convert_from(-1, "conversion failed"); Robert suggested renaming 'convert' to 'conversion' but I am not warming up to that (yet, you might have noticed I am slow) as I essentially see 'convert' as a functor, i.e. encapsulating as an action, i.e. a verb is more appropriate. For that reason the code itself looks readable (to me) as "boost::convert<int, string>" reads as 'convert int to string". Thanks, Vladimir.

On Thursday, February 19, 2009 5:05 PM Vladimir.Batov@wrsa.com.au wrote:
Robert suggested renaming 'convert' to 'conversion' but I am not warming up to that (yet, you might have noticed I am slow) as I essentially see 'convert' as a functor, i.e. encapsulating as an action, i.e. a verb is more appropriate. For that reason the code itself looks readable (to me) as "boost::convert<int, string>" reads as 'convert int to string".
I assume that's a reference to me. My suggestion of "conversion" was as a namespace name. Were you referring to my suggestion of using "converter" for the function object and "convert" for the function template that would deduce template parameters? _____ Rob Stewart robert.stewart@sig.com Software Engineer, Core Software using std::disclaimer; Susquehanna International Group, LLP http://www.sig.com IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
participants (2)
-
Stewart, Robert
-
Vladimir.Batov@wrsa.com.au