Boost logo

Boost :

From: Marshall Clow (marshall_at_[hidden])
Date: 2003-03-27 13:28:54


On Monday, I attempted to run the Darwin regression tests off the main branch.

The tools failed to build - specifically "process_jam_log" failed to build, because
the filesystem library failed to compile.

In particular, "libs/filesystem/src/exception.cpp" failed on line 192 in
the constructor:

> filesystem_error::filesystem_error(
> const std::string & who,
> const std::string & message )
>line 192--> : std::runtime_error(
> other_error_prep( who, message ).c_str() ),
> m_sys_err(0), m_err(other_error), m_who(who)
> {}

There are a couple of things here:
1) std::runtime_error is defined (for gcc, AFAICT) in <stdexcept>, but filesystem/exception.hpp
only includes <exception>.
--> This, IMHO, is the cause of the error.

2) filesystem_error is defined (in filesystem/exception.hpp) as inheriting from std::exception,
not std::runtime_error.
> class filesystem_error : public std::exception
> {

When I add the line "#include <stdexcept>" to exception.cpp, I get the following error instead:

../../../libs/filesystem/src/exception.cpp: In constructor
   `boost::filesystem::filesystem_error::filesystem_error(const std::string&,
   const std::string&)':
../../../libs/filesystem/src/exception.cpp:196: type `class std::runtime_error'
   is not a direct base of `boost::filesystem::filesystem_error'

-- 
-- Marshall
Marshall Clow     Idio Software   <mailto:marshall_at_[hidden]>
Hey! Who messed with my anti-paranoia shot?

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