>Author: sebor >Date: Tue Jul 29 09:24:16 2008 >New Revision: 680756 > >Modified: stdcxx/branches/4.2.x/include/loc/_codecvt.h >URL: >http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/loc/ >_codecvt.h?rev=680756&r1=680755&r2=680756&view=diff >=============================================================== >=============== >--- stdcxx/branches/4.2.x/include/loc/_codecvt.h (original) >+++ stdcxx/branches/4.2.x/include/loc/_codecvt.h Tue Jul 29 >09:24:16 2008 >@@ -120,6 +120,8 @@ > > _EXPLICIT codecvt (_RWSTD_SIZE_T __ref = 0): >_RW::__rw_facet (__ref) { } > >+ virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW; >+
Are you sure you don't want to be using _RWSTD_DECLARE_NOTHROW here, and _RWSTD_DEFINE_NOTHROW with the definition. I only see _RWSTD_ATTRIBUTE_NOTHROW being defined for gcc, and that means compile error for all other configurations. What is the rationale for using the attribute instead of a throw spec? I realize that _RWSTD_ATTRIBUTE_NOTHROW will end up being an empty throw spec on most platforms, but I don't understand the advantage of using the attribute. I see that you use both in this changelist, but I don't understand why you selected one over the other. It seems that the only difference is that, in the worst case, using throw specs might require an try/catch block be inserted into the definition of the destructor and that should not result in much additional code. Of course this would only happen if the compiler cannot determine that no exception is thrown by base or member destructors, which it should be able to do if they are appropriately decorated. That said, it seems that it would be best to decorate the base class (_RW::__rw_facet) destructor similarly, regardless of what decoration is being used. > // 22,2,1,5,1, p1 > result out (state_type& __state, > const intern_type* __from, const intern_type* >__from_end, >@@ -188,7 +190,7 @@ > > _EXPLICIT codecvt (_RWSTD_SIZE_T = 0); > >- virtual ~codecvt (); >+ virtual ~codecvt () _RWSTD_ATTRIBUTE_NOTHROW; I see no mention of adding this attribute in the changelog. Should there be? Travis