|
Boost Users : |
Subject: Re: [Boost-users] [Filesystem] There must be a better way to do path decomposition
From: Norbert Wenzel (norbert.wenzel.lists_at_[hidden])
Date: 2011-08-03 12:56:18
On 03.08.2011 18:16, Ramon F Herrera wrote:
> I tried to capture `*it' in a string and in a string_type but the
> compiler does not like the '=' operator.
I just tested that in Filesystem v3 and there decomposed path parts are
still of type filesystem::path.
So my code looks something like this in v3.
fs::path tmp("/foo/bar/path");
for(fs::path::const_iterator it = tmp.begin();
it != tmp.end(); ++it)
{
std::string tmpS = (*it).string();
std::wstring tmpWs = (*it).wstring();
}
So maybe switching to v3 (if your code is still v2) might be a solution
(since it's anyway the default).
regards,
Norbert
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net