C++ Logo

STD-DISCUSSION

Advanced search

Subject: Re: Partial ordering of function template which have a place holder for deduced class type in the template parameter list.
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2020-08-02 17:33:16


On Sun, Aug 2, 2020 at 2:30 PM Olivier Kannengieser via Std-Discussion
<std-discussion_at_[hidden]> wrote:
>
> 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.

No, "place holder for deduced class type for the declaration of non
type template parameter" is the C++17 feature that allows `auto x` to
work in template arguments. A template name by itself is not a
placeholder.

C++20 allows `ConceptName auto x`, which does the above except with a
concept constraint as to `x`'s type.

At no point does C++ permit `TemplateName x` to work in a template
parameter list. There were some Concept ideas that `TemplateName<auto>
x` might work, and maybe Concepts TS allowed you to drop the argument.
But C++20 does not.


STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups