Skip to content

Error on use of NTTP in lambda in requires clause with same name as variable template #147650

@Eczbek

Description

@Eczbek

https://godbolt.org/z/3r8erG8dP

template<int> int a;

template<int a> void f() requires requires { [] { a; }; } {}

int main() {}
<source>:3:51: error: use of variable template 'a' requires template arguments
    3 | template<int a> void f() requires requires { [] { a; }; } {}
      |                                                   ^
<source>:1:19: note: template is declared here
    1 | template<int> int a;
      | ~~~~~~~~~~~~~     ^
1 error generated.
Compiler returned: 1

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"conceptsC++20 conceptsconfirmedVerified by a second partylambdaC++11 lambda expressions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions