|
Boost : |
Subject: Re: [boost] [lexical_cast] A suggestion
From: David Abrahams (dave_at_[hidden])
Date: 2009-02-08 18:34:47
on Sun Feb 08 2009, Vladimir.Batov-AT-wrsa.com.au wrote:
>> Have you proposed some way to do away with default constructibility
>> somehow?
>
> Foo default_foo;
> Foo foo = lexical_cast(str, default_foo);
>
> (or whatever instead of lexical_cast) has no Foo::Foo() requirement.
and... how is lexical_cast going to come up with an object into which it
can stream? Is it going to use default_foo? In that case, what if
streaming fails partway through? Are you assuming copyability?
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk