https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120384

            Bug ID: 120384
           Summary: [12/13/14/15/16] _BinaryPredicateConcept checks in
                    std::unique_copy are wrong
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#define _GLIBCXX_CONCEPT_CHECKS 1
#include <algorithm>

void uniq(const int* first, const int* last, int* out)
{
  std::unique_copy(first, last, out);
}


This valid code fails to compile with:

/usr/include/c++/14/bits/predefined_ops.h:117:16: error: invalid type argument
of unary ‘*’ (have ‘int’)
  117 |       { return *__it1 == *__it2; }
      |                ^~~~~~
/usr/include/c++/14/bits/predefined_ops.h:117:26: error: invalid type argument
of unary ‘*’ (have ‘int’)
  117 |       { return *__it1 == *__it2; }
      |                          ^~~~~~


This was broken by r0-125454-gea89b2482f97aa

Reply via email to