You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Farid Zaripov <Fa...@kyiv.vdiweb.com> on 2006/08/19 16:28:51 UTC

RE: svn commit: r432723 - /incubator/stdcxx/trunk/src/collate.cpp

  Martin, after that patch I got compiler (MSVC7.1) error:
----------------
collate.cpp
c:\Incubator\stdcxx\trunk\src\podarray.cc(48) : error C2995:
'__rw::__rw_pod_array<_TypeT,_Size>
&__rw::__rw_pod_array<_TypeT,_Size>::append(const _TypeT
*,__rw::_SizeT)' : template function has already been defined
        c:\Incubator\stdcxx\trunk\src\podarray.h(137) : see declaration
of '__rw::__rw_pod_array<_TypeT,_Size>::append'
----------------

  The reason is double inclusion of the podarray.cc (first included in
#include "podarray.h",
the second is explicitly included in collate.cpp).

  For successful compiling I added #ifndef #define #endif guard to the
file podarray.cpp,
but I think should be another solution to resolve this problem.

Farid.

> -----Original Message-----
> From: sebor@apache.org [mailto:sebor@apache.org] 
> Sent: Saturday, August 19, 2006 12:02 AM
> To: stdcxx-commits@incubator.apache.org
> Subject: svn commit: r432723 - /incubator/stdcxx/trunk/src/collate.cpp
> 
> Author: sebor
> Date: Fri Aug 18 14:01:55 2006
> New Revision: 432723
> 
> URL: http://svn.apache.org/viewvc?rev=432723&view=rev
> Log:
> 2006-08-18  Martin Sebor  <se...@roguewave.com>
> 
> 	* collate.cpp (podarray.cc): #included in order to be able
> 	to explicitly instantiate __rw_pod_array.
> 
> Modified:
>     incubator/stdcxx/trunk/src/collate.cpp
> 
> Modified: incubator/stdcxx/trunk/src/collate.cpp
> URL: 
> http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/collat
> e.cpp?rev=432723&r1=432722&r2=432723&view=diff
> ==============================================================
> ================
> --- incubator/stdcxx/trunk/src/collate.cpp (original)
> +++ incubator/stdcxx/trunk/src/collate.cpp Fri Aug 18 14:01:55 2006
> @@ -58,6 +58,11 @@
>  #include "podarray.h"      // for __rw_pod_array
>  #include "setlocale.h"     // for __rw_setlocale
>  
> +#ifdef _RWSTD_NO_IMPLICIT_INCLUSION
> +   // included for the explicit instantiation below #  include 
> +"podarray.cc"
> +#endif   // _RWSTD_NO_IMPLICIT_INCLUSION
> +
>  
>  // define _RWSTD_MB_MAX to the greater of MB_LEN_MAX and 8  
> // where 8 the maximum length necessary to encode a Unicode
> 
> 
> 

Re: svn commit: r432723 - /incubator/stdcxx/trunk/src/collate.cpp

Posted by Martin Sebor <se...@roguewave.com>.
Martin Sebor wrote:
> Farid Zaripov wrote:
> 
>>   Martin, after that patch I got compiler (MSVC7.1) error:
>> ----------------
>> collate.cpp
>> c:\Incubator\stdcxx\trunk\src\podarray.cc(48) : error C2995:
>> '__rw::__rw_pod_array<_TypeT,_Size>
>> &__rw::__rw_pod_array<_TypeT,_Size>::append(const _TypeT
>> *,__rw::_SizeT)' : template function has already been defined
>>         c:\Incubator\stdcxx\trunk\src\podarray.h(137) : see declaration
>> of '__rw::__rw_pod_array<_TypeT,_Size>::append'
>> ----------------
>>
>>   The reason is double inclusion of the podarray.cc (first included in
>> #include "podarray.h",
>> the second is explicitly included in collate.cpp).
>>
>>   For successful compiling I added #ifndef #define #endif guard to the
>> file podarray.cpp,
>> but I think should be another solution to resolve this problem.
> 
> 
> You're right. I've been testing a patch for this. If all
> goes well I'll commit it tomorrow. Sorry about the breakage!

This should fix it. Tested with gcc and icc on Linux:

   http://svn.apache.org/viewvc?rev=433116&view=rev

Let me know if there are any remaining MSVC problems.

Martin

Re: svn commit: r432723 - /incubator/stdcxx/trunk/src/collate.cpp

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:

>   Martin, after that patch I got compiler (MSVC7.1) error:
> ----------------
> collate.cpp
> c:\Incubator\stdcxx\trunk\src\podarray.cc(48) : error C2995:
> '__rw::__rw_pod_array<_TypeT,_Size>
> &__rw::__rw_pod_array<_TypeT,_Size>::append(const _TypeT
> *,__rw::_SizeT)' : template function has already been defined
>         c:\Incubator\stdcxx\trunk\src\podarray.h(137) : see declaration
> of '__rw::__rw_pod_array<_TypeT,_Size>::append'
> ----------------
> 
>   The reason is double inclusion of the podarray.cc (first included in
> #include "podarray.h",
> the second is explicitly included in collate.cpp).
> 
>   For successful compiling I added #ifndef #define #endif guard to the
> file podarray.cpp,
> but I think should be another solution to resolve this problem.

You're right. I've been testing a patch for this. If all
goes well I'll commit it tomorrow. Sorry about the breakage!

Martin