incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek" <tvi...@roguewave.com>
Subject RE: [PATCH] std::string::_C_grow() 4.2 incompatibility (was: Re: difference in exported symbols between 4.1.3 and 4.2.0 15d dll's (MSVC 7.1))
Date Thu, 18 Oct 2007 00:49:36 GMT

Martin,

That patch won't work. The _C_grow needs to be made private. It was
private in 4.1.3, but is public in 4.2. IMO it should always be private
and it was an oversight that under some conditions it could be made
public.

I have tested the following patch.


Index: string
===================================================================
--- string	(revision 585687)
+++ string	(working copy)
@@ -521,6 +521,8 @@
 
 #endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
 
+private:
+
     size_type _C_grow (size_type, size_type) const;
 
 public:





>-----Original Message-----
>From: Martin Sebor [mailto:sebor@roguewave.com] 
>Sent: Wednesday, October 17, 2007 3:13 PM
>To: stdcxx-dev@incubator.apache.org
>Subject: [PATCH] std::string::_C_grow() 4.2 incompatibility 
>(was: Re: difference in exported symbols between 4.1.3 and 
>4.2.0 15d dll's (MSVC 7.1))
>
>Martin Sebor wrote:
>> Some more wisdom that I had snipped previously:
>> 
>> Travis Vitek wrote:
>> [...]
>>  >
>>  > Note that the basic_string<>::_C_grow() method is not 
>accessed by any
>>  > inline member functions, but it still causes problems. I 
>don't think we
>>  > can skip fixing these problems just because a function 
>appears to not be
>>  > accessable to user code.
>>  >
>> 
>> Ah, I know why! Because it's called from a member template which
>> gets instantiated in the test.
>> 
>> So we need to add string::_C_grow() to the list of symbols to
>> fix in 4.2.0.
>
>Travis, can you try this patch?
>
>Index: include/string
>===================================================================
>--- include/string      (revision 585584)
>+++ include/string      (working copy)
>@@ -504,8 +504,6 @@
>          return _C_make_iter (_C_data + __pos1);
>      }
>
>-public:
>-
>  #ifndef _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
>
>      template <class _InputIter>
>@@ -519,6 +517,8 @@
>          return __rw_replace_aux (*this, __first1, __last1, __first2, 
>__last2);
>      }
>
>+public:
>+
>  #endif   // _RWSTD_NO_STRING_OUTLINED_MEMBER_TEMPLATES
>
>      size_type _C_grow (size_type, size_type) const;
>
>

Mime
View raw message