]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/50661 (std::equal should use more efficient version for arrays of...
authorEmil Wojak <emil@wojak.eu>
Tue, 11 Oct 2011 12:39:18 +0000 (12:39 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 11 Oct 2011 12:39:18 +0000 (12:39 +0000)
2011-10-11  Emil Wojak  <emil@wojak.eu>

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

From-SVN: r179801

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_algobase.h

index 1822ff610e78c5d78fe3333f7db31285a7c22c6a..628e213f1fc8d82da4d9c77f47eddbd76f997a50 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-11  Emil Wojak  <emil@wojak.eu>
+
+       PR c++/50661
+       * include/bits/stl_algobase.h (equal): Compare arrays of pointers
+       too with memcmp.
+
 2011-10-10  Benjamin Kosnik  <bkoz@redhat.com>
 
        PR libstdc++/49818
@@ -11,7 +17,7 @@
        * libsupc++/eh_catch.cc: Same.
        * libsupc++/eh_globals.cc: Same.
        * libsupc++/eh_type.cc: Same.
-       
+
 2011-10-07  Jonathan Wakely  <jwakely.gcc@gmail.com>
 
        * testsuite/util/testsuite_allocator.h (uneq_allocator): Add
index 9d3a970d2caefd057d4aa6e8fd48f3f71340af91..a002461ae98036976ce385e3ffe0b9ff3063186b 100644 (file)
@@ -812,7 +812,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     {
       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);