
----- Original Message ----- From: "Jeffrey Lee Hellrung, Jr." <jhellrung@ucla.edu> To: <boost@lists.boost.org> Sent: Friday, May 28, 2010 5:08 PM Subject: Re: [boost] Is there any interest in Boost.Conversion? On 5/28/2010 5:23 AM, vicente.botet wrote:
Jeffrey does this answer to your attends?
I will release the pack function and vector conversion (v.0.5) on the Vault once I will update the documentation.
Comments are welcome :)
I'll have to take a look at this later. Note that in the application where I might've used a Conversion library, I now just use a user-provided function object to define the conversions involved, which works well for my purposes. As far as the ambiguity problem, I've tried using the following framework. Essentially, you want to be able to customize the behavior of convert_to(From&, type_tag<To>) via ADL. What you could do is first call convert_to0 unqualified, with the convention that this would be specialized in From's namespace. The default behavior is then to call convert_to1 unqualified, with the convention that this would be specialized in To's namespace. Perhaps you can rename convert_to0 and convert_to1 to convert_to_from and convert_to_to, or something. This might resolve the ambiguity issues, at least to a sufficient degree... - Jeff _______________________________________________ Yeah, this gives priority to one namespace. I will try it? Thanks for the trick, Vicente