This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 13631 Problems in messages
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 24 Nov 2014 00:23:42 +0000
- Subject: Re: PR 13631 Problems in messages
- Authentication-results: sourceware.org; auth=none
- References: <54726A30 dot 9030606 at gmail dot com>
On 24/11/14 00:13 +0100, François Dumont wrote:
Hello
As we are at doing some evolution in the ABI I would like to take
the opportunity to merge branch libstdcxx_so_7-2. The first fix was
I don't think we want to merge everything, but it's certainly worth
looking to see if there are some fixes on that branch worth taking.
It would have been better to do during stage 1 though :-\
about a messages facet issue. So here is the version for the trunk
which is the one from the branch plus management of the charset part.
This way messages<wchar_t> works too.
There are still some uncovered points in this patch:
- I had to make codecvt _M_c_locale_codecvt public to access it from
the messages facet code. How do you want to handle it properly ? A
friend function to access it or do I make messages facet friend ?
- I haven't use the ABI tag yet. I know that there is a plan to tag
locale facets, will it work for what I am doing ?
Unless I'm missing something you're not making any ABI changes to
std::messages, just making the definitiosn of some functions no longer
inline.
Note that I could use std::tuple instead of combination of
std::pair and std::unique_ptr instead of wchar_buffer if we were
building it in C++11 mode. Is it possible ?
Yes, the symlink to the messages_members.cc file would need to be
moved from src/c++98/Makefile.am to src/c++11/Makefile.am
Index: include/bits/locale_facets_nonio.h
===================================================================
--- include/bits/locale_facets_nonio.h (revision 217816)
+++ include/bits/locale_facets_nonio.h (working copy)
@@ -1842,22 +1842,6 @@
*/
virtual void
do_close(catalog) const;
-
- // Returns a locale and codeset-converted string, given a char* message.
- char*
- _M_convert_to_char(const string_type& __msg) const
- {
- // XXX
- return reinterpret_cast<char*>(const_cast<_CharT*>(__msg.c_str()));
- }
-
- // Returns a locale and codeset-converted string, given a char* message.
- string_type
- _M_convert_from_char(char*) const
- {
- // XXX
- return string_type();
- }
};
Those members are used by the ieee_1003.1-2001 locale.