Boost logo

Boost :

Subject: Re: [boost] [filesystem][system] Usage guideline request
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-11-05 14:15:27


Eric MALENFANT wrote:
> Andrey Semashev wrote:
>> Is this the right way to do this? Is there a portable way to do it?
>>
>
> My understanding of
> http://www.boost.org/doc/libs/1_40_0/libs/system/doc/reference.html#Non-
> member-functions is that error_category.equivalent() is there to
> abstract this. operator== is overloaded on error_code and
> error_condition to perform that equivalence check, so this should do
> what you want:
>
> catch (const basic_filesystem_error& e){
> if (e == make_error_condition(posix_error::no_space_on_device)){
> //...
> }
> }

Thanks, looks like this is what I need.


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