Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users] lexical-cast throws exceptions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-02 16:54:57


AMDG

Roman Shmelev wrote:
> Please take a look at the simple piece of code.
> When it is compiled on MSVC 2008 (no sp) , Win Sp2 then we receive
> access violation on program exit
> Can you tell me the reason of such strange behaviour? (boost 1.38.0)
>
> #include "stdafx.h"
>
> #include <iostream>
> #include <boost/lexical_cast.hpp>
> //#include <boost/thread.hpp>
>
> using namespace std;
>
> class ctest
> {
> public:
> ~ctest () {
> boost::lexical_cast<string>(1);
> }
> };
>
> ctest a;
>
> int main(int argc, char* argv[])
> {
> boost::lexical_cast<string>(1);
> return 0;
> }
>

It looks like the standard library's facet(s) have been
destroyed before a.

In Christ,
Steven Watanabe


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