[patch] Add <codecvt> and last pieces of C++11 std::lib

Jonathan Wakely jwakely@redhat.com
Tue Jan 20 12:00:00 GMT 2015


On 19/01/15 13:27 +0000, Jonathan Wakely wrote:
>On 16/01/15 23:38 +0000, Jonathan Wakely wrote:
>>This defines the C++11 header <codecvt> and adds the wstring_convert
>>and wbuffer_convert utilities.
>
>I've discovered that wasn't the last piece of the C++11 library, there
>were new constructors taking std::string added to std::locale and all
>the std::xxx_byname facets.
>
>It would be fixed by the attached patch (tested on x86_64-linux with
>old and new std::string), but we're in stage4 now so I'm not
>committing it yet.

It's committed to trunk now.

>commit 977b94ddcf8218efa0318f69b3a2cc5b5d9eb5be
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date:   Sun Jan 18 16:41:28 2015 +0000
>
>    Add C++11 std::string constructors for locales and facets.
>    
>    	* config/abi/pre/gnu.ver: Export new constructors.
>    	* include/bits/codecvt.h (codecvt_byname): Add string constructor.
>    	(codecvt_byname<char16_t>, codecvt_byname<char32_t>): Define explicit
>    	specializations and declare explicit instantiations.
>    	* include/bits/locale_classes.h (locale, collate_byname): Add string
>    	constructors.
>    	* include/bits/locale_facets.h (ctype_byname, numpunct_byname):
>    	Likewise.
>    	* include/bits/locale_facets_nonio.h (time_get_byname,
>    	time_put_byname, moneypunct_byname, messages_byname): Likewise.
>    	* src/c++11/codecvt.cc (codecvt_byname<char16_t>,
>    	codecvt_byname<char32_t>): Define explicit instantiations.
>    	* src/c++11/locale-inst.cc (time_put_byname, codecvt_byname):
>    	Instantiate string constructors.
>    	(ctype_byname): Define string constructor.
>    	* testsuite/22_locale/codecvt_byname/1.cc: New.
>    	* testsuite/22_locale/collate_byname/1.cc: New.
>    	* testsuite/22_locale/ctype_byname/2.cc: New.
>    	* testsuite/22_locale/messages_byname/1.cc: New.
>    	* testsuite/22_locale/moneypunct_byname/1.cc: New.
>    	* testsuite/22_locale/numpunct_byname/1.cc: New.



More information about the Gcc-patches mailing list