Boost logo

Boost Users :

Subject: Re: [Boost-users] Filesystem Library Bug
From: Lars Viklund (zao_at_[hidden])
Date: 2012-03-05 03:00:55

On Mon, Mar 05, 2012 at 08:45:20AM +0100, Andreas Wehrmann wrote:
> On 03/02/2012 08:25 PM, Sam Hertz wrote:
>> boost::filesystem::create_directory(boost::filesystem::current_path()/"test");
>> boost::filesystem::remove_all(boost::filesystem::current_path()/"test");
> You know you're dividing, right?
> current_path() divided by constant string :-)

What is this supposed to mean?
It's not constructive and if it's a joke, it's a very poor one.

If you truly are ignorant, Boost.Filesystem uses the binary '/' operator
to mean path concatenation.

As for the error, it may be due to converting the string literal into a
fs::path object via an unexpected locale's codecvt or too early in the
run-time to use a codecvt safely.

Also, double-check that you're using matching headers to your built
libraries, and that the libraries are built using the right compile-time
settings. In particular, -std=c++0x tends to be a common mismatch.

Lars Viklund | zao_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at