This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

std::exception_ptr on Cygwin


It is impossible to use std::exception_ptr and related
functionality on Cygwin in C++0x mode, despite the
fact the necessary classes seem to be implemented.
That is because in <exception> there is a conditional
block:

#if (defined(__GXX_EXPERIMENTAL_CXX0X__) \
     && defined(_GLIBCXX_ATOMIC_BUILTINS_4))
#include <exception_ptr.h>
#endif

The macro __GXX_EXPERIMENTAL_CXX0X__ is
defined correctly, as expected, but

_GLIBCXX_ATOMIC_BUILTINS_4

is not, as Cygwin does not use glibc. Its underlying
processor architecture, however, supports the fullest
set of atomic primitives, so is there really a need to
make it glibc-dependent? If I enforce the macro
definition from the command line, then the exception_ptr
-dependent code compiles correctly (but does not link
because of

 undefined reference to `std::__exception_ptr::exception_ptr::~exception_ptr()

and the other non-inline members. I presume
it is not the recommended way.

Best regards
Piotr Wyderski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]