Subject: Re: [boost] [review] string convert
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-05-04 13:25:03
Jeff Flinn wrote:
> Gordon Woodhull wrote:
> > Something is needed here, when you want to use the fallback
> > but you also want to know if conversion succeeded. See that
> > snippet from Vladimir that I just quoted again in my reply to
> > Matt.
> I'm having a hard time envisioning why you would ever care if
> conversion failed if you are specifying a default. Is that in
> the snippet you refer to? Can you show it in this context to
> avoid confusion?
Just think about using non-DefaultConstructible UDTs as the source type. How would the convert_cast create a variable to hold the conversion result it's to return if the conversion succeeds? That's why Vicente suggested a default_value customization point previously.
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk