Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2008-01-13 10:58:15


Miguel Lopes wrote:
> Hi all,
>
>
>
> I have a small question about ptime class usage. I am currently working
> on an old project that uses Boost library; unfortunately, when I build
> and run the project executable some exceptions are thrown. I found out
> that some parts of the project are trying to create ptime objects like
> this:
>
>
>
> *ptime(time_from_string(string(sz))) *
>
>
>
> That line throws an exception, when sz is empty.
>
>
>
> So my question is: Is there any version (Boost version) of ptime class
> that accepts an empty string as argument? The problem is that I need to

Not that I can remember...but memory is fragile.

> investigate which version of Boost, is being really used in the project
> makefile and with all versions of Boost that line throws the exception.
> On the other hand I have a precompiled binary of the project, and under
> the same data input conditions, it works perfectly, that is, even with
> empty dates no exceptions are thrown.

It's also possible that they made some modification of the source to make it
return not-a-date-time or something.

HTH,

Jeff


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