id summary reporter owner description type status milestone component version severity resolution keywords cc 2395 [filesystem] operations_test regression test fails on MSVC with STDCXX Farid Zaripov Beman Dawes " The operations_test regression test fails on MSVC with STDCXX: http://tinyurl.com/53m6t4 The reason is checking in libs/filesystem/test/operation_test.cpp, lines 149-150 : {{{ try { fs::create_directory( ""no-such-dir/foo/bar"" ); } catch ( std::runtime_error x ) { exception_thrown = true; if ( report_throws ) std::cout << x.what() << std::endl; if ( platform == ""Windows"" && language_id == 0x0409 ) // English (United States) BOOST_CHECK( std::strcmp( x.what(), ""boost::filesystem::create_directory"" ) == 0 ); } }}} Our implementation of the copy ctor (as well as assignment operator) of the std::runtime_error class copying the resulting string of the what() method of the operand. So that in the following code the all three assertions will pass: {{{ boost::system::system_error se(3, boost::system::get_system_category(), ""boost::filesystem::create_directory""); std::runtime_error re = se; assert (0 != std::strcmp (re.what(), ""boost::filesystem::create_directory"")); assert (0 == std::strcmp (re.what(), se.what())); assert (0 == std::strcmp (re.what(), ""boost::filesystem::create_directory: The system cannot find the path specified: \""no-such-dir\\foo\\bar\"""")); }}} The proposed patch: {{{ Index: libs/filesystem/test/operations_test.cpp =================================================================== --- libs/filesystem/test/operations_test.cpp (revision 49179) +++ libs/filesystem/test/operations_test.cpp (working copy) @@ -146,8 +146,9 @@ exception_thrown = true; if ( report_throws ) std::cout << x.what() << std::endl; if ( platform == ""Windows"" && language_id == 0x0409 ) // English (United States) - BOOST_CHECK( std::strcmp( x.what(), - ""boost::filesystem::create_directory"" ) == 0 ); + BOOST_CHECK( std::strncmp( x.what(), + ""boost::filesystem::create_directory"", + sizeof(""boost::filesystem::create_directory"")-1 ) == 0 ); } BOOST_CHECK( exception_thrown ); }}} " Patches closed Boost 1.37.0 filesystem Boost Development Trunk Problem fixed