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]

RFA: v3 PATCH to libsupc++/exception_ptr.h for C++0x support


While looking at c++/47263 I noticed that eh_ptr.cc doesn't compile in C++0x mode because __safe_bool isn't defined, but is used. Is this the way you'd like to fix that?
commit e018fa18d85e6974b3d66a12c5b7ae9f77b76683
Author: Jason Merrill <jason@redhat.com>
Date:   Sun May 22 16:31:20 2011 -0400

    	* libsupc++/exception_ptr.h: Fix compilation in C++0x mode.

diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h
index 26117cd..00b30fd 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -97,7 +97,9 @@ namespace std
       exception_ptr(exception_ptr&& __o) throw()
       : _M_exception_object(__o._M_exception_object)
       { __o._M_exception_object = 0; }
-#else
+#endif
+
+#if !defined (__GXX_EXPERIMENTAL_CXX0X__) || defined (_GLIBCXX_EH_PTR_COMPAT)
       typedef void (exception_ptr::*__safe_bool)();
 
       // For construction from nullptr or 0.

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