Date: Sun, 2 Aug 2020 18:33:16 -0400
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_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.
Received on 2020-08-02 17:36:46