1 // RUN: %clang_cc1 -std=c++20 -verify %s -o -
4 struct metre
: empty
{ };
5 struct second
: empty
{ };
6 template<auto, auto> struct divided_units
: empty
{ };
7 template<auto> struct quantity
{ }; // #QUANT
10 quantity
<divided_units
<metre
{}, second
{}>{}> q
{};
11 quantity
<metre
{}> q2
= q
;
12 // expected-error@-1 {{no viable conversion from 'quantity<divided_units<metre{}, second{}>{{}}>' to 'quantity<metre{{}}>'}}
13 // expected-note@#QUANT {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'quantity<divided_units<metre{}, second{}>{}>' to 'const quantity<metre{{}}> &' for 1st argument}}
14 // expected-note@#QUANT {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'quantity<divided_units<metre{}, second{}>{}>' to 'quantity<metre{{}}> &&' for 1st argument}}