Boost logo

Boost :

Subject: Re: [boost] [review] string convert
From: Vladimir Batov (vbatov_at_[hidden])
Date: 2011-05-03 05:08:47


> Vladimir Batov <vbatov <at> people.net.au> writes:
> > Vicente BOTET <vicente.botet <at> wanadoo.fr> writes:
> > The library provides a convert_to function that adds the specific dummy
> parameter. I recognize this is
> > tricky and that the overloading seems not natural from the user perspective
> but it works at least for the
> > cases I have tested.
>
> Vicente, Gordon,
>
> Thank you for the pointer, I had a quick look and indeed it seems to solve the
> specialization problem I was facing. Should we cancel/postpone this review and
> review Vicente's and mine together or something of that sort? If Vicente's is
> better as a starting point, it's fine by me. I am happy either way a s long as
> things are moving.

Vicente,

I had a quick look and your proposal. Conceptually it seems to be an extension
of lexical_cast philosophy on to type-to-type conversions. It does not seem to
provide any of the functionality that I (as a user) care about, i.e., fallback
value, throwing/non-throwing, formatting, locales, etc. Given convert_to
actually returns a Target value, I suspect, formatting, locales, etc. are simply
not possible as I believe we have to have an intermediary object (converter) to
apply additional formatting, etc. Am I correct in my reading?

If so, then you and I are trying to address totally unrelated issues. I needed
'convert' as lexical_cast not not doing what I needed it to do. I do not think I
immediately have a need for type-to-type extension of lexical_cast.

V.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk