id summary reporter owner description type status milestone component version severity resolution keywords cc 7704 lexical_cast to filesystem::path fails for string::length > 22 Braden McDaniel Antony Polukhin "When building with clang on Darwin using `-stdlib=libc++`, a `lexical_cast` to a `filesystem::path` will fail if the input string is longer than 22 elements. Consider this test program: {{{ #!C++ #include #include int main() { try { boost::filesystem::path p; std::string s1 = ""aaaaaaaaaaaaaaaaaaaaaaa""; p = boost::lexical_cast(s1); } catch (std::exception & ex) { std::cerr << ex.what() << std::endl; return EXIT_FAILURE; } } }}} …compiled thusly: {{{ clang++ -stdlib=libc++ -I /Users/bradenmcdaniel/Source/boost_1_52_0 -L /Users/bradenmcdaniel/Source/boost_1_52_0/stage/lib -lboost_filesystem -lboost_system -o lexical-cast-path lexical_cast_path.cpp }}} When run, it produces this output: {{{ $ ./lexical-cast-path bad lexical cast: source type value could not be interpreted as target }}} If the length of `s1` is reduced by 1 (from 23 to 22), the test program will succeed. " Bugs closed Boost 1.54.0 lexical_cast Boost 1.52.0 Problem fixed