Use const for template argument.
authorMartin Liska <mliska@suse.cz>
Tue, 4 Feb 2020 13:55:25 +0000 (14:55 +0100)
committerMartin Liska <mliska@suse.cz>
Tue, 5 May 2020 13:54:58 +0000 (15:54 +0200)
libstdc++-v3/ChangeLog:

2020-02-04  Martin Liska  <mliska@suse.cz>

PR c/92472
* include/parallel/multiway_merge.h:
Use const for _Compare template argument.

libstdc++-v3/include/parallel/multiway_merge.h

index 983c7b2bd9a6d12c06abba9921a1087221cc9e34..97a9ce0feb79f1d923b05116fa10dca604f86ade 100644 (file)
@@ -118,7 +118,7 @@ namespace __gnu_parallel
        *  @return @c true if less. */
       friend bool
       operator<(_GuardedIterator<_RAIter, _Compare>& __bi1,
-               _GuardedIterator<_RAIter, _Compare>& __bi2)
+               _GuardedIterator<_RAIter, const _Compare>& __bi2)
       {
        if (__bi1._M_current == __bi1._M_end)       // __bi1 is sup
          return __bi2._M_current == __bi2._M_end;  // __bi2 is not sup
@@ -188,7 +188,7 @@ namespace __gnu_parallel
        *  @return @c true if less. */
       friend bool
       operator<(_UnguardedIterator<_RAIter, _Compare>& __bi1,
-               _UnguardedIterator<_RAIter, _Compare>& __bi2)
+               _UnguardedIterator<_RAIter, const _Compare>& __bi2)
       {
        // Normal compare.
        return (__bi1.__comp)(*__bi1, *__bi2);