C++ Logo

std-discussion

Advanced search

Re: Partial ordering of function template which have a place holder for deduced class type in the template parameter list.

From: Olivier Kannengieser <okannen_at_[hidden]>
Date: Sun, 2 Aug 2020 20:30:25 +0200
No this is what I meant. 'A x' is a C++20 feature: place holder for deduced
class type for the declaration of non type template parameter.

Le dim. 2 août 2020 à 08:21, Jefferson Carpenter via Std-Discussion <
std-discussion_at_[hidden]> a écrit :

> On 7/28/2020 11:55 AM, Olivier Kannengieser via Std-Discussion wrote:
> > thought that this code should compile under C++20:
> >
> > template <class> struct A {};
> > template <class, A> struct B {};
> > template <A x> struct B <int, x> {};
> >
>
> You might have meant
>
> template <typename T, A<T> x> struct B <int, x> {};
>
> Since A does not name a type, it names a family of types.
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>

Received on 2020-08-02 13:33:58