Boost logo

Boost Users :

Subject: Re: [Boost-users] [Filesystem] v3 using wide url with boost::iostreams::mapped_file
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2011-03-10 17:11:03


eg wrote:
> On 2/23/2011 4:01 PM, Bibbo, Joe wrote:
>> We recently flipped the switch from v2 to v3 of the boost file system.
>> Now that boost:filesystem::wpath
>> is no longer a valid type, how do you work with the wide url and
>> boost:iostreams::mapped_file?
>>
>> With v2 we would
>> void doSomethingWithMapfile(std::wstring& url)
>> {
>> boost::iostreams::basic_mapped_file_params<boost::filesystem::wpath>
>> attribs;
>>
>> // initialize attribs, including
>>
>> attribs.path = url;
>>
>> // create our mapped file
>>
>> boost::iostreams::mapped_file mapFile(attribs);
>>
>> // An then do something with the map file.
>> }
>>
>
>
> There is a ticket #4485 which seems to cover this issue
> https://svn.boost.org/trac/boost/ticket/4485
>
>
> It looks like someone has proposed a patch to address this, so hopefully
> it will get applied soon...
>
> You could always apply the patch and see if it works for you.

It's not really a patch in the true sense. You need to wrap the path
that you pass to mapped_file at the client call site. I've not gotten
feedback on how to fix the issue internally to iostreams.

Jeff


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