Patchwork [v3] PR libstdc++/50661

login
register
mail settings
Submitter Paolo Carlini
Date Oct. 11, 2011, 12:39 p.m.
Message ID <4E943902.6030702@oracle.com>
Download mbox | patch
Permalink /patch/118981/
State New
Headers show

Comments

Paolo Carlini - Oct. 11, 2011, 12:39 p.m.
Hi,

tested x86_64-linux, committed.

Paolo.

////////////////////
2011-10-11  Emil Wojak  <emil@wojak.eu>

	PR c++/50661
	* include/bits/stl_algobase.h (equal): Compare arrays of pointers
	too with memcmp.

Patch

Index: include/bits/stl_algobase.h
===================================================================
--- include/bits/stl_algobase.h	(revision 179798)
+++ include/bits/stl_algobase.h	(working copy)
@@ -812,7 +812,8 @@ 
     {
       typedef typename iterator_traits<_II1>::value_type _ValueType1;
       typedef typename iterator_traits<_II2>::value_type _ValueType2;
-      const bool __simple = (__is_integer<_ValueType1>::__value
+      const bool __simple = ((__is_integer<_ValueType1>::__value
+			      || __is_pointer<_ValueType1>::__value)
 	                     && __is_pointer<_II1>::__value
 	                     && __is_pointer<_II2>::__value
 			     && __are_same<_ValueType1, _ValueType2>::__value);