Boost logo

Boost :

Subject: Re: [boost] Formal Review Request: Boost.Convert
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-02-24 16:32:19

Vladimir Batov wrote:

> Can
> you put together some kind of proof-of-concept code for me to better
> understand how you want to do that.

I have put together a rough example of what I have in mind. Please, find
the code attached. It works on my GCC 4.3.

It converts integral types to strings and back, it also supports the
"converter" functor that can be used with algorithms. Both of them
support a couple of named parameters for customization. The
implementation also has a fundamental support for further extension by
adding new conversion tags and specializing the "converter_impl"
template on them.

In order to inject new conversion tags into the library one has to
overload "get_conversion_tag" function. I admit that it doesn't look
very pretty, but it's a start, and it's non-intrusive. Maybe someone
will suggest something better.

PS: I had to extend Boost.Parameter a little, but that's not too much
and can be moved to Boost.Parameter if needed.

Boost list run by bdawes at, gregod at, cpdaniel at, john at