Skip to content

Clang accepts invalid parenthesized template name in deduction guide declaration #152019

@zygoloid

Description

@zygoloid

Along the same lines as #152018, but a somewhat different case:

template<typename T> struct X {};
(X)() -> X<int>;

Clang accepts, but this is invalid: the syntax for deduction guides does not allow parentheses around the template-name.

While GCC accepts this, other implementations (EDG, MSVC) do not, so it would probably make sense for clang to also reject.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions