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

--- Comment #11 from songb432 at gmail dot com ---
(In reply to Patrick Palka from comment #10)
> (In reply to songb432 from comment #9)
> > I agree. So it's all about parameter mapping. I misunderstood some rule
> > about normalization. But I still can't figure out this:
> > ```
> > template <class T> concept C = true;
> > template <class T> struct A {
> >   template <class U> U f(U) requires C<typename T::type>;   // #1
> >   template <class U> U f(U) requires C<T>;                  // #2
> > };
> > template <> template <class U>
> > U A<int>::f(U u) requires C<int> { return u; }              // OK,
> > specializes #2
> > ```
> > This does compile, while `A<int>{}.f(2)` does not. Why? Is it a DR?
> Declaration matching considers the written form of a constraint-expression. 
> Constraint satisfaction (and subsumption) considers the normalized form.


Oh I get it! Thanks for explanation!

Reply via email to