Boost logo

Boost Users :

Subject: Re: [Boost-users] program_options: accepting NaNs for doubles
From: Michael Lindner (mplmpl_at_[hidden])
Date: 2011-08-11 14:33:37


Hi Rhys,

I would think the workaround would be the one mentioned in the ticket you
reference, use the trunk version of boost.

Mike

On Thu, Aug 11, 2011 at 2:16 PM, Rhys Ulerich <rhys.ulerich_at_[hidden]>wrote:

> Responding to my own question...
>
> > program_options does not accept NaN or Inf as valid double input.
> >
> > 1) Does this count as a bug?
>
> It seems yes as the root cause appears to be a (now fixed for 1.48)
> bug in lexical_cast (https://svn.boost.org/trac/boost/ticket/5689). I
> have filed https://svn.boost.org/trac/boost/ticket/5776 against
> program_options with a milestone matching the lexical_cast bug.
>
> > 2) Can anyone suggest a workaround (shy of using string-based parameters
> and
> > calling strtod myself)?
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net