Skip to content

Commit 7417b4c

Browse files
authored
[clang] Add a new test for CWG2091 (#104573)
This patch adds a test from #42233, and updates CWG2091 status from `2.7` to `10`.
1 parent 9f430de commit 7417b4c

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

clang/test/CXX/drs/cwg20xx.cpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,34 @@ namespace cwg2083 { // cwg2083: partial
401401
#endif
402402
}
403403

404-
namespace cwg2091 { // cwg2091: 2.7
404+
namespace cwg2091 { // cwg2091: 10
405405
template<int &> struct X;
406406
template<int &N> void f(X<N>&);
407407
int n;
408408
void g(X<n> &x) { f(x); }
409+
410+
namespace GH42233 {
411+
enum E { I };
412+
413+
class AA { };
414+
E EV[1] = {I};
415+
416+
template<class ENUM, const ENUM* const VALUES>
417+
struct S
418+
{
419+
template< class E, const E* const V>
420+
friend AA& operator<<( AA& os, const S<E,V>& e );
421+
};
422+
423+
int f()
424+
{
425+
S< E, EV > x;
426+
427+
AA a;
428+
a << x;
429+
return 0;
430+
}
431+
} // namespace GH42233
409432
} // namespace cwg2091
410433

411434
namespace cwg2094 { // cwg2094: 5

clang/www/cxx_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12361,7 +12361,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1236112361
<td><a href="https://cplusplus.github.io/CWG/issues/2091.html">2091</a></td>
1236212362
<td>CD4</td>
1236312363
<td>Deducing reference non-type template arguments</td>
12364-
<td class="full" align="center">Clang 2.7</td>
12364+
<td class="full" align="center">Clang 10</td>
1236512365
</tr>
1236612366
<tr id="2092">
1236712367
<td><a href="https://cplusplus.github.io/CWG/issues/2092.html">2092</a></td>

0 commit comments

Comments
 (0)