Make messages_members.cc Catalog_info and Catalogs ABI agnostic

François Dumont frs.dumont@gmail.com
Tue Mar 24 21:09:00 GMT 2015


On 20/03/2015 12:38, Jonathan Wakely wrote:
> On 19/03/15 21:50 +0100, François Dumont wrote:
>> On 18/03/2015 19:16, Jonathan Wakely wrote:
>>>
>>> Preparing this patch reminded me that we currently have two copies of
>>> the Catalog_info and Catalogs code in the unnamed namespace in
>>> config/locale/gnu/messages_members.cc, one using the old string and
>>> one using the new. We should really alter the code to not use
>>> std::string so that the catalogs can be shared by both versions of the
>>> messages facets.
>>>
>> Hello
>>
>>    Do you mean like the attached patch ? Or do I need to isolate 
>> get_catalogs function in a dedicated source file that won't be built 
>> twice ?
>
> That's a partial fix, but the types and functions are still in an
> anonymous namespace, so will still be duplicated.
>
> To do it correctly they can't be in an anon namespace and the names
> must be uglified.
>
     Ok so here is what I plan to do. Only problem, I don't know how to 
integrate catalogs.h and catalogs.cc into the build system. catalogs.cc 
should only be built if gnu locale model is chosen. But I am pretty sure 
that if the solution is accepted someone will tell me how to have it 
built correctly.

     I didn't want to populate std namespace to I put everything in 
std::__detail. Maybe you would prefer another namespace or simply put it 
in std.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: messages_members.patch
Type: text/x-patch
Size: 11390 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150324/e40f8d4c/attachment.bin>


More information about the Libstdc++ mailing list