Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-03-07 03:15:47

Beman Dawes wrote:

>> Maybe, this can be converted into a function with static variable, so
>> that the
>> static variable is only initialized on the first call?
> OK, this has been changed in CVS. Please try it with the same LC_MESSAGES
> problem, and let me know if the exception occurs at a more appropriate
> time.

Sorry, no, because of this another static object:

   const std::codecvt<wchar_t, char, std::mbstate_t> *
             &std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> >
              ( loc() ) );

which cals 'loc' before 'main' is called, and gives the same problem.

> I'm also wondering if the path.cpp code should catch the exception and
> call boost::throw_exception() with a filesystem_error. What do you think
> about doing that? Would it have made diagnosing the problem easier for
> you?

I don't know because I don't know the what() text of the exception thrown on
wrong locale. As soon as we get *some* exception caught, things will be


Boost list run by bdawes at, gregod at, cpdaniel at, john at