|
Boost Users : |
Subject: [Boost-users] declaration does not declare anything - exception
From: Dirk Griffioen (dirk.griffioen_at_[hidden])
Date: 2010-02-03 07:41:45
Hi,
When I compile with Xcode I get a 'declaration does not declare
anything' error on boost/exception/diagnostic_information.hpp.
However, the exception test run fine when I compile with bjam
--toolset=darwin ...
I am quite sure both use the same compiler (g++-4.0.1) and have the same
options (I copied from the bjam set to Xcode).
I now outcommented it (see below), but this is not a permanent solution.
It should be valid, so what am I doing wrong regarding Xcode?
Any help would be very much appreciated!
Best, Dirk
template <class T>
struct
enable_boost_exception_overload
{
struct yes { char q[100]; };
typedef char no;
//static yes check(exception const *);
//static no check(...);
enum e { value=sizeof(/*check*/((T*)0))==sizeof(yes) };
};
template <class T>
struct
enable_std_exception_overload
{
struct yes { char q[100]; };
typedef char no;
//static yes check(std::exception const *);
//static no check(...);
enum e { value = !enable_boost_exception_overload<T>::value
&& sizeof(/*check*/((T*)0))==sizeof(yes) };
};
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net