Skip to content

Aggregate CTAD of parenthesized prvalue fails #64347

Closed
@JohelEGP

Description

@JohelEGP

See https://compiler-explorer.com/z/xjxWbKTs7.

template<class T> struct X { T x; };
auto x = X(0);
<source>:2:10: error: no viable constructor or deduction guide for deduction of template arguments of 'X'
    2 | auto x = X(0);
      |          ^
<source>:1:26: note: candidate template ignored: could not match 'X<T>' against 'int'
    1 | template<class T> struct X { T x; };
      |                          ^
<source>:1:26: note: candidate function template not viable: requires 0 arguments, but 1 was provided
1 error generated.
Compiler returned: 1

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions