RE: [boost] 1.30.0-b1: filesystem::path::swap

2003-03-12 Thread Beman Dawes
At 06:18 AM 3/12/2003, Geurt Vos wrote:
>
>>  >Hi,
>>  >Is there any reason boost::filesystem::path doesn't
>>  >provide a swap(path &) function? If there is, I think
>>  >the docs should explain why, but if there isn't, well,
>>  >can it still be implemented before 1.30.0 goes gold?
>>
>> Let me turn the question around and ask what your
>> expectations would be for
>> a swap member beyond what is already offered by std::swap?
>>
>> No throw guarantee?
>>
>
>Yes. That is, this is the main (or actually only)
>reason for asking.
OK, I've added it to do-list.htm.

I don't want to try to add it for 1.30.0 - it's too late at this point.

If you want to send me a patch, feel free!

--Beman

PS: In researching this, I found that the C++ standard seemed to indicate 
that basic_string::swap() did not give the expected guarantee not to throw. 
I've raised the issue with the committee, as it looks to me like a defect. 
Of course, the defect might just be in my expectation for 
basic_string::swap().

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


RE: [boost] 1.30.0-b1: filesystem::path::swap

2003-03-12 Thread Geurt Vos

>  >Hi,
>  >Is there any reason boost::filesystem::path doesn't
>  >provide a swap(path &) function? If there is, I think
>  >the docs should explain why, but if there isn't, well,
>  >can it still be implemented before 1.30.0 goes gold?
> 
> Let me turn the question around and ask what your 
> expectations would be for 
> a swap member beyond what is already offered by std::swap?
> 
> No throw guarantee?
> 

Yes. That is, this is the main (or actually only)
reason for asking.

> More efficient?
> 

I guess with a swap member, you kind of get this for free.
With filesystem::path I consider this a non-issue, though.
I mean, the time a possible extra copy takes is negligible
to retrieving a directory listing or parsing a config file
(opened using filesystem::ifstream).

> Or are you asking that filesystem::path satisfy more container 
> requirements?
> 

No, a no throw 'swap' will suffice...
I mean, except for swap, filesystem::path
is complete enough for what I use it for.
So I obviously also don't really care about
other requirements (looking at it from a 
user point of view).

Geurt

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Re: [boost] 1.30.0-b1: filesystem::path::swap

2003-03-11 Thread Beman Dawes
At 03:23 AM 3/10/2003, Geurt Vos wrote:
>Hi,
>Is there any reason boost::filesystem::path doesn't
>provide a swap(path &) function? If there is, I think
>the docs should explain why, but if there isn't, well,
>can it still be implemented before 1.30.0 goes gold?
Let me turn the question around and ask what your expectations would be for 
a swap member beyond what is already offered by std::swap?

No throw guarantee?

More efficient?

Or are you asking that filesystem::path satisfy more container 
requirements?

--Beman

___
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost