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

--- Comment #1 from Andrew Sutton <andrew.n.sutton at gmail dot com> ---
I believe that the ambiguity is correct under the revised semantics of
concepts.

The targets of the parameter mapping in Sentinel differs for the two
declarations of distance because the order of template parameters changes. For
the first declaration, the parameter mapping of the normal form of the requires
expression maps the 2nd template parameter of the concept to the 2nd template
parameter of the function template. For the second declaration, the normal form
of the requires expression maps the 2nd template parameter of the concept to
the 1st template parameter of the function template. Template parameters with
different indexes are not equivalent.

Reply via email to