Author: sebor Date: Tue Jul 29 10:51:40 2008 New Revision: 680791 URL: http://svn.apache.org/viewvc?rev=680791&view=rev Log: 2008-07-29 Martin Sebor <[EMAIL PROTECTED]>
* include/loc/_codecvt.h (codecvt_byname<char, char>): Added an explicit specialization to avoid having to explicitly instanting the primary template in order to emit the definition of (the now explicitly defined out-of-line, since rev 680756) virtual dtor needed in __rw::__rw_ct_codecvt(). * src/codecvt.cpp (codecvt_byname<char, char>): Defined ctor and dtor. Modified: stdcxx/branches/4.2.x/include/loc/_codecvt.h stdcxx/branches/4.2.x/src/codecvt.cpp 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=680791&r1=680790&r2=680791&view=diff ============================================================================== --- stdcxx/branches/4.2.x/include/loc/_codecvt.h (original) +++ stdcxx/branches/4.2.x/include/loc/_codecvt.h Tue Jul 29 10:51:40 2008 @@ -407,6 +407,21 @@ }; +_RWSTD_SPECIALIZED_CLASS +class _RWSTD_EXPORT codecvt_byname<char, char, _RWSTD_MBSTATE_T> + : public codecvt<char, char, _RWSTD_MBSTATE_T> +{ + char _C_namebuf [32]; + +public: + + _EXPLICIT codecvt_byname (const char*, _RWSTD_SIZE_T = 0); + + virtual ~codecvt_byname () _RWSTD_ATTRIBUTE_NOTHROW; +}; + + + #ifndef _RWSTD_NO_WCHAR_T _RWSTD_SPECIALIZED_CLASS Modified: stdcxx/branches/4.2.x/src/codecvt.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/src/codecvt.cpp?rev=680791&r1=680790&r2=680791&view=diff ============================================================================== --- stdcxx/branches/4.2.x/src/codecvt.cpp (original) +++ stdcxx/branches/4.2.x/src/codecvt.cpp Tue Jul 29 10:51:40 2008 @@ -268,6 +268,23 @@ } +codecvt_byname<char, char, _RWSTD_MBSTATE_T>:: +codecvt_byname (const char *name, size_t ref) + : codecvt <intern_type, extern_type, state_type> (ref) +{ + _C_set_name (name, _C_namebuf, sizeof _C_namebuf); +} + + +// outlined to avoid generating a vtable in each translation unit +// that uses the class +/* virtual */ codecvt_byname<char, char, _RWSTD_MBSTATE_T>:: +~codecvt_byname () +{ + // no-op +} + + } // namespace std #define TARGS_C <char, char, _RWSTD_MBSTATE_T>