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 2007/02/21 05:38:08 UTC

[PATCH] 17.names.cpp

> Author: sebor
> Date: Mon Jan  1 17:34:56 2007
> New Revision: 491734
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=491734
> Log:
> 2007-01-01  Martin Sebor  <se...@roguewave.com>
> 
> 	* 17.names.cpp: Added more public names to test for.
> 
> Modified:
>     incubator/stdcxx/trunk/tests/intro/17.names.cpp

  The test 17.names.cpp failed to compile under MSVC 7.1 in
valarray include file due to 'get_slice' and 'get_array' names
defined as '!ERROR!'.

  The proposed patch:
---------------
Index: 17.names.cpp
===================================================================
--- 17.names.cpp	(revision 509794)
+++ 17.names.cpp	(working copy)
@@ -655,10 +655,14 @@
 #include <utility>
 
 // assume <valarray> isn't #included by any other public header
-// `start' mandated by the standard
+// `start', `get_slice' and `get_array' mandated by the standard
 #undef start
+#undef get_slice
+#undef get_array
 #include <valarray>
 #define start                   !ERROR!
+#define get_slice               !ERROR!
+#define get_array               !ERROR!
 #include <vector>
 
 #ifndef _RWSTD_NO_NEW_HEADER
---------------

Farid.


Re: [PATCH] 17.names.cpp

Posted by Martin Sebor <se...@roguewave.com>.
Farid Zaripov wrote:
>> Author: sebor
>> Date: Mon Jan  1 17:34:56 2007
>> New Revision: 491734
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=491734
>> Log:
>> 2007-01-01  Martin Sebor  <se...@roguewave.com>
>>
>>     * 17.names.cpp: Added more public names to test for.
>>
>> Modified:
>>     incubator/stdcxx/trunk/tests/intro/17.names.cpp
> 
>  The test 17.names.cpp failed to compile under MSVC 7.1 in
> valarray include file due to 'get_slice' and 'get_array' names
> defined as '!ERROR!'.

Yes, I know about the failures. I have a patch for valarray
that renames the offending symbols (among other things) that
I'm planning to commit but I'm not quite ready. I suppose I
shouldn't have enhanced the test without fixing the library
first, my bad. I'll commit it next week.

Martin

> 
>  The proposed patch:
> ---------------
> Index: 17.names.cpp
> ===================================================================
> --- 17.names.cpp    (revision 509794)
> +++ 17.names.cpp    (working copy)
> @@ -655,10 +655,14 @@
> #include <utility>
> 
> // assume <valarray> isn't #included by any other public header
> -// `start' mandated by the standard
> +// `start', `get_slice' and `get_array' mandated by the standard
> #undef start
> +#undef get_slice
> +#undef get_array
> #include <valarray>
> #define start                   !ERROR!
> +#define get_slice               !ERROR!
> +#define get_array               !ERROR!
> #include <vector>
> 
> #ifndef _RWSTD_NO_NEW_HEADER
> ---------------
> 
> Farid.
> 
> 
>