Skip to content

Commit 9d717f0

Browse files
committed
fixup! [clang] Allow parentheses around CTAD declarators
Add test for CWG2376
1 parent 66833f4 commit 9d717f0

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

clang/test/CXX/drs/cwg23xx.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,20 @@ class C {
379379
};
380380
} // namespace cwg2370
381381

382+
namespace cwg2376 { // cwg2376: 21
383+
#if __cpp_deduction_guides >= 201703
384+
template<int = 0> class C {};
385+
386+
C a;
387+
const volatile C b = C<2>();
388+
C (c) = {};
389+
C* d;
390+
// expected-error@-1 {{cannot form pointer to deduced class template specialization type}}
391+
C e[1];
392+
// expected-error@-1 {{cannot form array of deduced class template specialization type}}
393+
#endif
394+
}
395+
382396
namespace cwg2386 { // cwg2386: 9
383397
// Otherwise, if the qualified-id std::tuple_size<E> names a complete class
384398
// type **with a member value**, the expression std::tuple_size<E>::value shall

clang/www/cxx_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14091,7 +14091,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1409114091
<td><a href="https://cplusplus.github.io/CWG/issues/2376.html">2376</a></td>
1409214092
<td>CD5</td>
1409314093
<td>Class template argument deduction with array declarator</td>
14094-
<td class="unknown" align="center">Unknown</td>
14094+
<td class="unreleased" align="center">Clang 21</td>
1409514095
</tr>
1409614096
<tr id="2377">
1409714097
<td><a href="https://cplusplus.github.io/CWG/issues/2377.html">2377</a></td>

0 commit comments

Comments
 (0)