Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2006-04-11 14:28:47

Yuval Ronen wrote:
> David Abrahams wrote:
>> optional<T> string_to<T>(x)

FWIW, I like to_string()/string_to() A LOT more than lexical_cast<>.
IMO all of the deficiencies of lexical_cast<> are becasue it supposedly
pretends to do much more than it actually does in practice.
That is, it's definition is too general (convert anything to anything via a
stream) while in practice is used mostly (if not exclusively) for to/from
string conversions.
IMO to_string/string_to allows the semantics of these functions to be
narrowed down amd focused in a way that permits implementations to fullfill
the most important requirements: closure (round_tripping), efficiency and
robustness (optional result in the string_to case).

> Yes, looks good.
> What is the status of optional<T> w.r.t to the standard, anyway? I
> hope
> it's on its way...

It was proposed for the Mont Tremblant meetting and it was generally well

Unfortunately, one of the critical issues raised during the meeting, the
semantics of asignment of optional references, still needs to be properly
addressed, so there is no updated revision yet.

Fernando Cacciola

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