Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-03-11 16:56:35


Walter Landry <wlandry_at_[hidden]> writes:

> It throws whenever BOOST_POSIX is not defined. It is just this (works
> with 1.30.0, don't know about 1.31.0):
>
> void link( const path & from_file_ph,
> const path & to_file_ph )
> {
> # ifdef BOOST_POSIX
> if(::link(from_file_ph.native_file_string().c_str(),
> to_file_ph.native_file_string().c_str()) != 0)
> # endif
> boost::throw_exception( filesystem_error(
> "boost::filesystem::symlink",
> from_file_ph, to_file_ph, fs::detail::system_error_code() ) );
> }

Why is a runtime error better than a compile-time error in this case?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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