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] Add <codecvt> and last pieces of C++11 std::lib


On Tue, Jan 20, 2015 at 3:59 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> 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.

On Linux/ia-32, I got

output is:
/tmp/ccApSqaQ.o: In function `facet<char>::facet()':^M
/export/gnu/import/git/gcc-test-x32/src-trunk/libstdc++-v3/testsuite/22_locale/ctype_byname/2.cc:29:
undefined reference to
`std::ctype_byname<char>::ctype_byname(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned
int)'^M
/tmp/ccApSqaQ.o: In function `facet<wchar_t>::facet()':^M
/export/gnu/import/git/gcc-test-x32/src-trunk/libstdc++-v3/testsuite/22_locale/ctype_byname/2.cc:29:
undefined reference to
`std::ctype_byname<wchar_t>::ctype_byname(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned
int)'^M
collect2: error: ld returned 1 exit status^M

FAIL: 22_locale/ctype_byname/2.cc (test for excess errors)
FAIL: libstdc++-abi/abi_check


H.J.

-- 
H.J.


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