|
Boost : |
From: Walter Landry (wlandry_at_[hidden])
Date: 2004-03-12 12:03:52
David Abrahams <dave_at_[hidden]> wrote:
> 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?
I implemented it this way because it was the easiest thing to do. I'm
happy to make it a compile-time error.
Regards,
Walter Landry
wlandry_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk