abort when constructing filesystem::path object

Hi
I'm trying to use the filesystem library, and I get an abort when trying
to initialise a path object with a string containing a space.
#include

You can either construct the "hello world" path with the different
checker or set it by default:
boost::filesystem::path::default_name_check(boost::filesystem::native);
I suppose spaces aren't allowed by default to give maximum portability.
On Tue, 30 Nov 2004 11:30:34 +1100, Richard Wolf
Hi
I'm trying to use the filesystem library, and I get an abort when trying to initialise a path object with a string containing a space.
#include
#include <iostream> int main() { boost::filesystem::path p1("hello"); std::cout << p1.string(); boost::filesystem::path p2("hello world"); std::cout << p2.string();
}
when run, this prints:
helloAborted
I couldn't find anything saying that the string path constructor can't contain a space.
Am I doing something wrong, or is this a bug?
Using gcc 3.3.4 on Debian.
thanks,
Richard
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Cory Nelson http://www.int64.org

On Tue, 2004-11-30 at 15:45, Cory Nelson wrote:
You can either construct the "hello world" path with the different checker or set it by default: boost::filesystem::path::default_name_check(boost::filesystem::native);
I suppose spaces aren't allowed by default to give maximum portability.
Yep, that fixed it. Thanks. Richard
participants (2)
-
Cory Nelson
-
Richard Wolf