Boost logo

Boost :

Subject: [boost] Behavior change in path operator /
From: Gérald Fauvelle (gf_at_[hidden])
Date: 2009-07-15 04:42:14


Hi all,

I'm updating my boost version from 1.33 to 1.38... That's a big step,
and I've found a difference in operator / of filesystem::path.

In 1.33, when I was doing :

path a = path("d:/toto/titi");
path b = path("d:/tata/tutu");

path c = a/b;

I had c == "d:/tata/tutu"

So if b was a complete (or absolute) path, the result was b, whatever
value has "a".

I don't know if this behavior was correct or not, but we were using it
this way, it was fine.

Now with 1.38, I have :

c == "d:/toto/titi/d:/tata/tutu"

That is at first different from previous behavior, and also obviously
wrong for a path syntax on Windows at least. It seems also that in 1.33
a path like this would raise an exception.

I've tried to find when, in what version, this change occured, but
couldn't find it in release notes.

Was this change made intentionanly, if yes, what is the reason for that?

And if I want previous behavior, I have 2 solutions. Fix my code, of fix
boost code. I'm afraid that if I fix boost code I could break some boost
functionnalities, or can I do it with no problem ?

Thanks,

Gérald


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk