diff --git a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp index 085976b081332..974240c514846 100644 --- a/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp +++ b/clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.conv/p4.cpp @@ -130,6 +130,15 @@ namespace non_ptr_ref_cv_qual { int (&test_conv_to_arr_1)[3] = ConvToArr(); // ok const int (&test_conv_to_arr_2)[3] = ConvToArr(); // ok, with qualification conversion + struct ConvToConstArr { + template + operator const Arr &() { // expected-note {{candidate}} + static_assert(N == 3, ""); + } + }; + Arr &test_conv_to_const_arr_1 = ConvToConstArr(); // expected-error {{no viable}} + const Arr &test_conv_to_const_arr_2 = ConvToConstArr(); // ok + #if __cplusplus >= 201702L template using Function = T(U...) noexcept(Noexcept); template struct ConvToFunction {