C++ Logo


Advanced search

Subject: Re: Partial ordering of function template which have a place holder for deduced class type in the template parameter list.
From: Jefferson Carpenter (jeffersoncarpenter2_at_[hidden])
Date: 2020-08-02 01:20:59

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 list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups