This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [patch-rfc] N2179: Exception Propagation in C++


Paolo Carlini wrote:
Is __GXX_EXPERIMENTAL_CXX0X__ defined during the compilation
of libsupc++ itself?

At the moment is not defined, because there are no reasons to do that. Maybe you want to arrange things in such a way that it can be safely defined. For sure, however, when the user normally includes <exception> in its source without afterwards passing -std=c++0x, he doesn't want to see in std:: anything having to do with exception_ptr and more generally the C++0x features specified in N2179...
That's understandable. However, my problem is simple: <exception> contains the definition of exception_ptr. Various source files of libsupc++ contain implementations of its members, as well as the three functions using it. These need to see the definition of exception_ptr.

I see three solutions:
1) Compile libsupc++ in experimental C++0x mode.
2) Add another symbol (or there may be an existing one) during the libsupc++ build that I can use as an alternate in making the definition visible, i.e.


#if defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_BUILDING_LIBSUPCXX__)
class exception_ptr ...


3) Define my own symbol in the implementing source files, before including the relevant headers. However, while this solution is the least intrusive towards the whole of GCC, it doesn't appeal to me.

Sebastian


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