boost.filesystem create_directories throws std::bad_alloc

后端 未结 2 869
野的像风
野的像风 2021-01-19 02:30

I have a Visual Studio 2008 C++03 application using Boost 1.47.0 running in Windows XP SP3.

The call boost::filesystem::create_directories( L\"c:\\\\foo\\\\bar

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-19 03:04

    This seems to be a known bug in Microsoft's implementation of std::locale when running a DEBUG build. It was reported June 2012.

    The message you get regarding memory address CDCDCDCE implies accessing deleted memory, as this bug describes.

    There is no solution currently described in Microsoft's site, but I would suggest trying a different facet by changing L"c:\\foo\\bar" to "c:\\foo\\bar".

提交回复
热议问题