Boost logo

Boost :

Subject: Re: [boost] [filesystem] temp_dir_path()
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-10-16 12:18:35

Beman Dawes wrote:
> On Thu, Oct 14, 2010 at 3:05 PM, Jeff Flinn
> <TriumphSprint2000_at_[hidden]> wrote:
>> I've attached an updated patch to ticket #4742.
>> This adds tests to operations_test.cpp that test the error handling for both
>> returned error code and thrown filesystem_error. Additionally it tests
>> proper retrieval of the path from the list of env vars for each of the
>> platforms.
>> Also, temp_dir_path now also sets the error_code to ENOTDIR upon failure.
>> These test pass on Windows XP with MSVC8 and Mac OSX10.5.8 with Xcode3.1.2
>> using gcc 4.0.1
>> I'd appreciate it if others could run the tests on other os/compilers as
>> well.
> First, thanks to Jeff for a nice piece of work!
> For those of you who didn't actually look at his patch file, he
> provided a working implementation, test code, and documentation. All
> in the style of the current code, and fully integrated into the
> library. A joy to work with.


> I've applied the patch to my working copy, inspected the code and
> documentation, and tested with the compilers on my Windows machine.
> Here are my reactions:
> * This is useful functionality and I'm planning to accept it into the
> library. A few nits follow, but they are all trivial to fix.
> * For consistency with the rest of the library, the name should be
> "temp_directory_path" rather than "temp_dir_path".


> * I'll do a bit of doc rewording to make them a bit less Windows and
> POSIX centric.

Sounds good.

> * There are compilation failures (see below) with MinGW. I'm guessing
> this is a minor configuration issue with the test code that will be
> trivial to fix.
> * And of course Jeff will be given credit for contributing this nice
> addition to Boost.Filesystem.
> Thanks,
> --Beman
> ..\v3\test\operations_test.cpp: In function
> 'void<unnamed>::temp_dir_path_tests()':
> ..\v3\test\operations_test.cpp:1606:73: error: no matching function
> for call to '<unnamed>::temp_dir_path_tests()::guarded_tmp_vars::guarded_tmp_vars(const
> char*, int, int)'

Looks like that platform is compiling the windows code with
test_temp_dir.BOOST_FILESYSTEM_C_STR returning a const char*.


Boost list run by bdawes at, gregod at, cpdaniel at, john at