Boost logo

Boost :

From: Andrey Melnikov (melnikov_at_[hidden])
Date: 2005-06-20 08:31:45

Maxim Yegorushkin wrote:
> I'd like to be able to specialize lexical_cast for certain source->target
> conversions. With its current design I see no possibility to do that as
> function templates can not be partially specialized. Are the any plans to
> change that?

Did you mean partial, or simply explicit specialization?

For what do you need specialization? If you need it for extensibility,
current framework is already extensible through definition of << and >>

If you need it for performance, we had a discussion about lexical_cast
performance issues some time ago in thread named "lexical_cast with
default value", and I googled other discussions too by searching for
"lexical_cast performance".

We weren't able to provide enough arguments for such specialization, and
ended with a need for fast numeric conversion library which won't be
related to lexical_cast at all.

For performance reasons I use the patch I described in to allow specialization.


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